summaryrefslogtreecommitdiff
path: root/SRC
diff options
context:
space:
mode:
Diffstat (limited to 'SRC')
-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
1695 files changed, 284317 insertions, 155488 deletions
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( * )
+* ..
*
* =====================================================================
*