Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51343 - in sandbox/numeric_bindings: boost/numeric/bindings/blas boost/numeric/bindings/blas/level1 boost/numeric/bindings/blas/level2 boost/numeric/bindings/blas/level3 boost/numeric/bindings/lapack boost/numeric/bindings/lapack/auxiliary boost/numeric/bindings/lapack/computational boost/numeric/bindings/lapack/driver boost/numeric/bindings/traits libs/numeric/bindings/doc libs/numeric/bindings/tools libs/numeric/bindings/tools/templates
From: rutger_at_[hidden]
Date: 2009-02-20 04:27:59


Author: rutger
Date: 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
New Revision: 51343
URL: http://svn.boost.org/trac/boost/changeset/51343

Log:
Added the latest generated BLAS and LAPACK bindings

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/blas/blas.h (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/blas_names.h (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/asum.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/axpy.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/copy.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dot.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dotc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dotu.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/drot.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/nrm2.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rot.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotg.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotmg.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/scal.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/sdot.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/srot.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/swap.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gbmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gemv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/ger.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gerc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/geru.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hbmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hemv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/her.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/her2.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpr2.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/sbmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spr2.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/symv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/syr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/syr2.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tbmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tbsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tpmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tpsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/trmv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/trsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/gemm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/hemm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/symm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/trmm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/trsm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/ilaenv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsdc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbbrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbequ.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebal.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gecon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geequ.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gelqf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqlf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqp3.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getri.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbal.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gghrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggsvp.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hbgst.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hbtrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hecon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hegst.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/herfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hprfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hptrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hseqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/labrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/lacon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/laebz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/larz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opgtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgbr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormbr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormhr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormlq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormql.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormrq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormrz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbcon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbequ.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbstf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbtrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbtrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pocon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/poequ.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/porfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potri.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pprfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pptrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sbgst.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sbtrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sprfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sptrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stebz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sterf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sycon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sygst.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/syrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbcon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbtrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgexc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsja.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trcon.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trexc.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsen.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsyl.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trtri.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trtrs.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungbr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmbr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmhr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmlq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmql.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmrq.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmrz.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upgtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/cgesv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gees.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geesx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gegv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelss.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsy.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggesx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggglm.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gglse.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggsvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hesv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hesvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lacgv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/largv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/pbsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/pbsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/posv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/posvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ppsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ppsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sgesv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spsv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spsvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syev.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevr.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygvd.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sysv.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sysvx.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/lapack.h (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/lapack_names.h (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/solve.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/workspace.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/traits/
   sandbox/numeric_bindings/boost/numeric/bindings/traits/is_complex.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/traits/is_real.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/doc/numeric_bindings.qbk | 41 +++++++++++++------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py | 84 ++++++++++++++++++++++++++++++++-------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 4
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 4
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp | 6 -
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp | 15 +++---
   6 files changed, 110 insertions(+), 44 deletions(-)

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/blas.h
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/blas.h 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,555 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_BLAS_H
+#define BOOST_NUMERIC_BINDINGS_BLAS_BLAS_H
+
+#include <boost/numeric/bindings/traits/type.h>
+#include <boost/numeric/bindings/blas/blas_names.h>
+
+extern "C" {
+
+//
+// BLAS level1 routines
+//
+
+// Value-type variants of asum
+float BLAS_SASUM( integer_t const* n, float const* x, integer_t const* incx );
+double BLAS_DASUM( integer_t const* n, double const* x,
+ integer_t const* incx );
+
+// Value-type variants of axpy
+void BLAS_SAXPY( integer_t const* n, float const* a, float const* x,
+ integer_t const* incx, float* y, integer_t const* incy );
+void BLAS_DAXPY( integer_t const* n, double const* a, double const* x,
+ integer_t const* incx, double* y, integer_t const* incy );
+void BLAS_CAXPY( integer_t const* n, fcomplex_t const* a, fcomplex_t const* x,
+ integer_t const* incx, fcomplex_t* y, integer_t const* incy );
+void BLAS_ZAXPY( integer_t const* n, dcomplex_t const* a, dcomplex_t const* x,
+ integer_t const* incx, dcomplex_t* y, integer_t const* incy );
+
+// Value-type variants of copy
+void BLAS_SCOPY( integer_t const* n, float const* x, integer_t const* incx,
+ float const* y, integer_t const* incy );
+void BLAS_DCOPY( integer_t const* n, double const* x, integer_t const* incx,
+ double const* y, integer_t const* incy );
+void BLAS_CCOPY( integer_t const* n, fcomplex_t const* x,
+ integer_t const* incx, fcomplex_t const* y, integer_t const* incy );
+void BLAS_ZCOPY( integer_t const* n, dcomplex_t const* x,
+ integer_t const* incx, dcomplex_t const* y, integer_t const* incy );
+
+// Value-type variants of dot
+float BLAS_SDOT( integer_t const* n, float const* x, integer_t const* incx,
+ float const* y, integer_t const* incy );
+double BLAS_DDOT( integer_t const* n, double const* x, integer_t const* incx,
+ double const* y, integer_t const* incy );
+
+// Value-type variants of dotc
+fcomplex_t BLAS_CDOTC( integer_t const* n, fcomplex_t const* x,
+ integer_t const* incx, fcomplex_t const* y, integer_t const* incy );
+dcomplex_t BLAS_ZDOTC( integer_t const* n, dcomplex_t const* x,
+ integer_t const* incx, dcomplex_t const* y, integer_t const* incy );
+
+// Value-type variants of dotu
+fcomplex_t BLAS_CDOTU( integer_t const* n, fcomplex_t const* x,
+ integer_t const* incx, fcomplex_t const* y, integer_t const* incy );
+dcomplex_t BLAS_ZDOTU( integer_t const* n, dcomplex_t const* x,
+ integer_t const* incx, dcomplex_t const* y, integer_t const* incy );
+
+// Value-type variants of drot
+void BLAS_ZDROT( integer_t const* n, dcomplex_t const* cx,
+ integer_t const* incx, dcomplex_t const* cy, integer_t const* incy,
+ double const* c, double const* s );
+
+// Value-type variants of nrm2
+float BLAS_SNRM2( integer_t const* n, float const* x, integer_t const* incx );
+double BLAS_DNRM2( integer_t const* n, double const* x,
+ integer_t const* incx );
+
+// Value-type variants of rot
+void BLAS_SROT( integer_t const* n, float const* x, integer_t const* incx,
+ float* y, integer_t const* incy, float const* c, float const* s );
+void BLAS_DROT( integer_t const* n, double const* x, integer_t const* incx,
+ double* y, integer_t const* incy, double const* c, double const* s );
+
+// Value-type variants of rotg
+void BLAS_SROTG( float* a, float* b, float* c, float* s );
+void BLAS_DROTG( double* a, double* b, double* c, double* s );
+void BLAS_CROTG( fcomplex_t* a, fcomplex_t* b, float* c, fcomplex_t* s );
+void BLAS_ZROTG( dcomplex_t* a, dcomplex_t* b, double* c, dcomplex_t* s );
+
+// Value-type variants of rotm
+void BLAS_SROTM( integer_t const* n, float* x, integer_t const* incx,
+ float* y, integer_t const* incy, float* param );
+void BLAS_DROTM( integer_t const* n, double* x, integer_t const* incx,
+ double* y, integer_t const* incy, double* param );
+
+// Value-type variants of rotmg
+void BLAS_SROTMG( float* d1, float* d2, float* x1, float const* y1,
+ float* sparam );
+void BLAS_DROTMG( double* d1, double* d2, double* x1, double const* y1,
+ double* dparam );
+
+// Value-type variants of scal
+void BLAS_SSCAL( integer_t const* n, float const* a, float const* x,
+ integer_t const* incx );
+void BLAS_DSCAL( integer_t const* n, double const* a, double const* x,
+ integer_t const* incx );
+void BLAS_CSCAL( integer_t const* n, fcomplex_t const* a, fcomplex_t const* x,
+ integer_t const* incx );
+void BLAS_ZSCAL( integer_t const* n, dcomplex_t const* a, dcomplex_t const* x,
+ integer_t const* incx );
+
+// Value-type variants of sdot
+double BLAS_DSDOT( integer_t const* n, float const* sx, integer_t const* incx,
+ float const* sy, integer_t const* incy );
+
+// Value-type variants of srot
+void BLAS_CSROT( integer_t const* n, fcomplex_t const* cx,
+ integer_t const* incx, fcomplex_t const* cy, integer_t const* incy,
+ float const* c, float const* s );
+
+// Value-type variants of swap
+void BLAS_SSWAP( integer_t const* n, float* x, integer_t const* incx,
+ float* y, integer_t const* incy );
+void BLAS_DSWAP( integer_t const* n, double* x, integer_t const* incx,
+ double* y, integer_t const* incy );
+void BLAS_CSWAP( integer_t const* n, fcomplex_t* x, integer_t const* incx,
+ fcomplex_t* y, integer_t const* incy );
+void BLAS_ZSWAP( integer_t const* n, dcomplex_t* x, integer_t const* incx,
+ dcomplex_t* y, integer_t const* incy );
+
+//
+// BLAS level2 routines
+//
+
+// Value-type variants of gbmv
+void BLAS_SGBMV( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, float const* alpha,
+ float const* a, integer_t const* lda, float const* x,
+ integer_t const* incx, float const* beta, float* y,
+ integer_t const* incy );
+void BLAS_DGBMV( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, double const* alpha,
+ double const* a, integer_t const* lda, double const* x,
+ integer_t const* incx, double const* beta, double* y,
+ integer_t const* incy );
+void BLAS_CGBMV( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, fcomplex_t const* alpha,
+ fcomplex_t const* a, integer_t const* lda, fcomplex_t const* x,
+ integer_t const* incx, fcomplex_t const* beta, fcomplex_t* y,
+ integer_t const* incy );
+void BLAS_ZGBMV( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, dcomplex_t const* alpha,
+ dcomplex_t const* a, integer_t const* lda, dcomplex_t const* x,
+ integer_t const* incx, dcomplex_t const* beta, dcomplex_t* y,
+ integer_t const* incy );
+
+// Value-type variants of gemv
+void BLAS_SGEMV( char const* trans, integer_t const* m, integer_t const* n,
+ float const* alpha, float const* a, integer_t const* lda,
+ float const* x, integer_t const* incx, float const* beta, float* y,
+ integer_t const* incy );
+void BLAS_DGEMV( char const* trans, integer_t const* m, integer_t const* n,
+ double const* alpha, double const* a, integer_t const* lda,
+ double const* x, integer_t const* incx, double const* beta, double* y,
+ integer_t const* incy );
+void BLAS_CGEMV( char const* trans, integer_t const* m, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* x, integer_t const* incx, fcomplex_t const* beta,
+ fcomplex_t* y, integer_t const* incy );
+void BLAS_ZGEMV( char const* trans, integer_t const* m, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* x, integer_t const* incx, dcomplex_t const* beta,
+ dcomplex_t* y, integer_t const* incy );
+
+// Value-type variants of ger
+void BLAS_SGER( integer_t const* m, integer_t const* n, float const* alpha,
+ float const* x, integer_t const* incx, float const* y,
+ integer_t const* incy, float* a, integer_t const* lda );
+void BLAS_DGER( integer_t const* m, integer_t const* n, double const* alpha,
+ double const* x, integer_t const* incx, double const* y,
+ integer_t const* incy, double* a, integer_t const* lda );
+
+// Value-type variants of gerc
+void BLAS_CGERC( integer_t const* m, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* x, integer_t const* incx,
+ fcomplex_t const* y, integer_t const* incy, fcomplex_t* a,
+ integer_t const* lda );
+void BLAS_ZGERC( integer_t const* m, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* x, integer_t const* incx,
+ dcomplex_t const* y, integer_t const* incy, dcomplex_t* a,
+ integer_t const* lda );
+
+// Value-type variants of geru
+void BLAS_CGERU( integer_t const* m, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* x, integer_t const* incx,
+ fcomplex_t const* y, integer_t const* incy, fcomplex_t* a,
+ integer_t const* lda );
+void BLAS_ZGERU( integer_t const* m, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* x, integer_t const* incx,
+ dcomplex_t const* y, integer_t const* incy, dcomplex_t* a,
+ integer_t const* lda );
+
+// Value-type variants of hbmv
+void BLAS_CHBMV( char const* uplo, integer_t const* n, integer_t const* k,
+ fcomplex_t const* alpha, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* x, integer_t const* incx, fcomplex_t const* beta,
+ fcomplex_t* y, integer_t const* incy );
+void BLAS_ZHBMV( char const* uplo, integer_t const* n, integer_t const* k,
+ dcomplex_t const* alpha, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* x, integer_t const* incx, dcomplex_t const* beta,
+ dcomplex_t* y, integer_t const* incy );
+
+// Value-type variants of hemv
+void BLAS_CHEMV( char const* uplo, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* x, integer_t const* incx, fcomplex_t const* beta,
+ fcomplex_t* y, integer_t const* incy );
+void BLAS_ZHEMV( char const* uplo, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* x, integer_t const* incx, dcomplex_t const* beta,
+ dcomplex_t* y, integer_t const* incy );
+
+// Value-type variants of her
+void BLAS_CHER( char const* uplo, integer_t const* n, float const* alpha,
+ fcomplex_t const* x, integer_t const* incx, fcomplex_t* a,
+ integer_t const* lda );
+void BLAS_ZHER( char const* uplo, integer_t const* n, double const* alpha,
+ dcomplex_t const* x, integer_t const* incx, dcomplex_t* a,
+ integer_t const* lda );
+
+// Value-type variants of her2
+void BLAS_CHER2( char const* uplo, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* x, integer_t const* incx,
+ fcomplex_t const* y, integer_t const* incy, fcomplex_t* a,
+ integer_t const* lda );
+void BLAS_ZHER2( char const* uplo, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* x, integer_t const* incx,
+ dcomplex_t const* y, integer_t const* incy, dcomplex_t* a,
+ integer_t const* lda );
+
+// Value-type variants of hpmv
+void BLAS_CHPMV( char const* uplo, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* ap, fcomplex_t const* x,
+ integer_t const* incx, fcomplex_t const* beta, fcomplex_t* y,
+ integer_t const* incy );
+void BLAS_ZHPMV( char const* uplo, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* ap, dcomplex_t const* x,
+ integer_t const* incx, dcomplex_t const* beta, dcomplex_t* y,
+ integer_t const* incy );
+
+// Value-type variants of hpr
+void BLAS_CHPR( char const* uplo, integer_t const* n, float const* alpha,
+ fcomplex_t const* x, integer_t const* incx, fcomplex_t* ap );
+void BLAS_ZHPR( char const* uplo, integer_t const* n, double const* alpha,
+ dcomplex_t const* x, integer_t const* incx, dcomplex_t* ap );
+
+// Value-type variants of hpr2
+void BLAS_CHPR2( char const* uplo, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* x, integer_t const* incx,
+ fcomplex_t const* y, integer_t const* incy, fcomplex_t* ap );
+void BLAS_ZHPR2( char const* uplo, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* x, integer_t const* incx,
+ dcomplex_t const* y, integer_t const* incy, dcomplex_t* ap );
+
+// Value-type variants of sbmv
+void BLAS_SSBMV( char const* uplo, integer_t const* n, integer_t const* k,
+ float const* alpha, float const* a, integer_t const* lda,
+ float const* x, integer_t const* incx, float const* beta, float* y,
+ integer_t const* incy );
+void BLAS_DSBMV( char const* uplo, integer_t const* n, integer_t const* k,
+ double const* alpha, double const* a, integer_t const* lda,
+ double const* x, integer_t const* incx, double const* beta, double* y,
+ integer_t const* incy );
+
+// Value-type variants of spmv
+void BLAS_SSPMV( char const* uplo, integer_t const* n, float const* alpha,
+ float const* ap, float const* x, integer_t const* incx,
+ float const* beta, float* y, integer_t const* incy );
+void BLAS_DSPMV( char const* uplo, integer_t const* n, double const* alpha,
+ double const* ap, double const* x, integer_t const* incx,
+ double const* beta, double* y, integer_t const* incy );
+
+// Value-type variants of spr
+void BLAS_SSPR( char const* uplo, integer_t const* n, float const* alpha,
+ float const* x, integer_t const* incx, float* ap );
+void BLAS_DSPR( char const* uplo, integer_t const* n, double const* alpha,
+ double const* x, integer_t const* incx, double* ap );
+
+// Value-type variants of spr2
+void BLAS_SSPR2( char const* uplo, integer_t const* n, float const* alpha,
+ float const* x, integer_t const* incx, float const* y,
+ integer_t const* incy, float* ap );
+void BLAS_DSPR2( char const* uplo, integer_t const* n, double const* alpha,
+ double const* x, integer_t const* incx, double const* y,
+ integer_t const* incy, double* ap );
+
+// Value-type variants of symv
+void BLAS_SSYMV( char const* uplo, integer_t const* n, float const* alpha,
+ float const* a, integer_t const* lda, float const* x,
+ integer_t const* incx, float const* beta, float* y,
+ integer_t const* incy );
+void BLAS_DSYMV( char const* uplo, integer_t const* n, double const* alpha,
+ double const* a, integer_t const* lda, double const* x,
+ integer_t const* incx, double const* beta, double* y,
+ integer_t const* incy );
+
+// Value-type variants of syr
+void BLAS_SSYR( char const* uplo, integer_t const* n, float const* alpha,
+ float const* x, integer_t const* incx, float* a,
+ integer_t const* lda );
+void BLAS_DSYR( char const* uplo, integer_t const* n, double const* alpha,
+ double const* x, integer_t const* incx, double* a,
+ integer_t const* lda );
+
+// Value-type variants of syr2
+void BLAS_SSYR2( char const* uplo, integer_t const* n, float const* alpha,
+ float const* x, integer_t const* incx, float const* y,
+ integer_t const* incy, float* a, integer_t const* lda );
+void BLAS_DSYR2( char const* uplo, integer_t const* n, double const* alpha,
+ double const* x, integer_t const* incx, double const* y,
+ integer_t const* incy, double* a, integer_t const* lda );
+
+// Value-type variants of tbmv
+void BLAS_STBMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, float const* a,
+ integer_t const* lda, float* x, integer_t const* incx );
+void BLAS_DTBMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, double const* a,
+ integer_t const* lda, double* x, integer_t const* incx );
+void BLAS_CTBMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t* x, integer_t const* incx );
+void BLAS_ZTBMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t* x, integer_t const* incx );
+
+// Value-type variants of tbsv
+void BLAS_STBSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, float const* a,
+ integer_t const* lda, float* x, integer_t const* incx );
+void BLAS_DTBSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, double const* a,
+ integer_t const* lda, double* x, integer_t const* incx );
+void BLAS_CTBSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t* x, integer_t const* incx );
+void BLAS_ZTBSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* k, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t* x, integer_t const* incx );
+
+// Value-type variants of tpmv
+void BLAS_STPMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, float const* ap, float* x, integer_t const* incx );
+void BLAS_DTPMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, double const* ap, double* x,
+ integer_t const* incx );
+void BLAS_CTPMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, fcomplex_t const* ap, fcomplex_t* x,
+ integer_t const* incx );
+void BLAS_ZTPMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, dcomplex_t const* ap, dcomplex_t* x,
+ integer_t const* incx );
+
+// Value-type variants of tpsv
+void BLAS_STPSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, float const* ap, float* x, integer_t const* incx );
+void BLAS_DTPSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, double const* ap, double* x,
+ integer_t const* incx );
+void BLAS_CTPSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, fcomplex_t const* ap, fcomplex_t* x,
+ integer_t const* incx );
+void BLAS_ZTPSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, dcomplex_t const* ap, dcomplex_t* x,
+ integer_t const* incx );
+
+// Value-type variants of trmv
+void BLAS_STRMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, float const* a, integer_t const* lda, float* x,
+ integer_t const* incx );
+void BLAS_DTRMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, double const* a, integer_t const* lda, double* x,
+ integer_t const* incx );
+void BLAS_CTRMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* x, integer_t const* incx );
+void BLAS_ZTRMV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* x, integer_t const* incx );
+
+// Value-type variants of trsv
+void BLAS_STRSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, float const* a, integer_t const* lda, float* x,
+ integer_t const* incx );
+void BLAS_DTRSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, double const* a, integer_t const* lda, double* x,
+ integer_t const* incx );
+void BLAS_CTRSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* x, integer_t const* incx );
+void BLAS_ZTRSV( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* x, integer_t const* incx );
+
+//
+// BLAS level3 routines
+//
+
+// Value-type variants of gemm
+void BLAS_SGEMM( char const* transa, char const* transb, integer_t const* m,
+ integer_t const* n, integer_t const* k, float const* alpha,
+ float const* a, integer_t const* lda, float const* b,
+ integer_t const* ldb, float const* beta, float* c,
+ integer_t const* ldc );
+void BLAS_DGEMM( char const* transa, char const* transb, integer_t const* m,
+ integer_t const* n, integer_t const* k, double const* alpha,
+ double const* a, integer_t const* lda, double const* b,
+ integer_t const* ldb, double const* beta, double* c,
+ integer_t const* ldc );
+void BLAS_CGEMM( char const* transa, char const* transb, integer_t const* m,
+ integer_t const* n, integer_t const* k, fcomplex_t const* alpha,
+ fcomplex_t const* a, integer_t const* lda, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t const* beta, fcomplex_t* c,
+ integer_t const* ldc );
+void BLAS_ZGEMM( char const* transa, char const* transb, integer_t const* m,
+ integer_t const* n, integer_t const* k, dcomplex_t const* alpha,
+ dcomplex_t const* a, integer_t const* lda, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t const* beta, dcomplex_t* c,
+ integer_t const* ldc );
+
+// Value-type variants of hemm
+void BLAS_CHEMM( char const* side, char const* uplo, integer_t const* m,
+ integer_t const* n, fcomplex_t const* alpha, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t const* beta, fcomplex_t* c, integer_t const* ldc );
+void BLAS_ZHEMM( char const* side, char const* uplo, integer_t const* m,
+ integer_t const* n, dcomplex_t const* alpha, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t const* beta, dcomplex_t* c, integer_t const* ldc );
+
+// Value-type variants of her2k
+void BLAS_CHER2K( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, fcomplex_t const* alpha, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ float const* beta, fcomplex_t* c, integer_t const* ldc );
+void BLAS_ZHER2K( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, dcomplex_t const* alpha, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ double const* beta, dcomplex_t* c, integer_t const* ldc );
+
+// Value-type variants of herk
+void BLAS_CHERK( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, float const* alpha, fcomplex_t const* a,
+ integer_t const* lda, float const* beta, fcomplex_t* c,
+ integer_t const* ldc );
+void BLAS_ZHERK( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, double const* alpha, dcomplex_t const* a,
+ integer_t const* lda, double const* beta, dcomplex_t* c,
+ integer_t const* ldc );
+
+// Value-type variants of symm
+void BLAS_SSYMM( char const* side, char const* uplo, integer_t const* m,
+ integer_t const* n, float const* alpha, float const* a,
+ integer_t const* lda, float const* b, integer_t const* ldb,
+ float const* beta, float* c, integer_t const* ldc );
+void BLAS_DSYMM( char const* side, char const* uplo, integer_t const* m,
+ integer_t const* n, double const* alpha, double const* a,
+ integer_t const* lda, double const* b, integer_t const* ldb,
+ double const* beta, double* c, integer_t const* ldc );
+void BLAS_CSYMM( char const* side, char const* uplo, integer_t const* m,
+ integer_t const* n, fcomplex_t const* alpha, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t const* beta, fcomplex_t* c, integer_t const* ldc );
+void BLAS_ZSYMM( char const* side, char const* uplo, integer_t const* m,
+ integer_t const* n, dcomplex_t const* alpha, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t const* beta, dcomplex_t* c, integer_t const* ldc );
+
+// Value-type variants of syr2k
+void BLAS_SSYR2K( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, float const* alpha, float const* a,
+ integer_t const* lda, float const* b, integer_t const* ldb,
+ float const* beta, float* c, integer_t const* ldc );
+void BLAS_DSYR2K( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, double const* alpha, double const* a,
+ integer_t const* lda, double const* b, integer_t const* ldb,
+ double const* beta, double* c, integer_t const* ldc );
+void BLAS_CSYR2K( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, fcomplex_t const* alpha, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t const* beta, fcomplex_t* c, integer_t const* ldc );
+void BLAS_ZSYR2K( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, dcomplex_t const* alpha, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t const* beta, dcomplex_t* c, integer_t const* ldc );
+
+// Value-type variants of syrk
+void BLAS_SSYRK( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, float const* alpha, float const* a,
+ integer_t const* lda, float const* beta, float* c,
+ integer_t const* ldc );
+void BLAS_DSYRK( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, double const* alpha, double const* a,
+ integer_t const* lda, double const* beta, double* c,
+ integer_t const* ldc );
+void BLAS_CSYRK( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, fcomplex_t const* alpha, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* beta, fcomplex_t* c,
+ integer_t const* ldc );
+void BLAS_ZSYRK( char const* uplo, char const* trans, integer_t const* n,
+ integer_t const* k, dcomplex_t const* alpha, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* beta, dcomplex_t* c,
+ integer_t const* ldc );
+
+// Value-type variants of trmm
+void BLAS_STRMM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ float const* alpha, float const* a, integer_t const* lda, float* b,
+ integer_t const* ldb );
+void BLAS_DTRMM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ double const* alpha, double const* a, integer_t const* lda, double* b,
+ integer_t const* ldb );
+void BLAS_CTRMM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb );
+void BLAS_ZTRMM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb );
+
+// Value-type variants of trsm
+void BLAS_STRSM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ float const* alpha, float const* a, integer_t const* lda, float* b,
+ integer_t const* ldb );
+void BLAS_DTRSM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ double const* alpha, double const* a, integer_t const* lda, double* b,
+ integer_t const* ldb );
+void BLAS_CTRSM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ fcomplex_t const* alpha, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb );
+void BLAS_ZTRSM( char const* side, char const* uplo, char const* transa,
+ char const* diag, integer_t const* m, integer_t const* n,
+ dcomplex_t const* alpha, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb );
+
+}
+
+#endif
+

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/blas_names.h
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/blas_names.h 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,269 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_BLAS_NAMES_H
+#define BOOST_NUMERIC_BINDINGS_BLAS_BLAS_NAMES_H
+
+#include <boost/numeric/bindings/traits/fortran.h>
+
+//
+// BLAS level1 routines
+//
+
+// Value-type variants of asum
+#define BLAS_SASUM FORTRAN_ID( sasum )
+#define BLAS_DASUM FORTRAN_ID( dasum )
+
+// Value-type variants of axpy
+#define BLAS_SAXPY FORTRAN_ID( saxpy )
+#define BLAS_DAXPY FORTRAN_ID( daxpy )
+#define BLAS_CAXPY FORTRAN_ID( caxpy )
+#define BLAS_ZAXPY FORTRAN_ID( zaxpy )
+
+// Value-type variants of copy
+#define BLAS_SCOPY FORTRAN_ID( scopy )
+#define BLAS_DCOPY FORTRAN_ID( dcopy )
+#define BLAS_CCOPY FORTRAN_ID( ccopy )
+#define BLAS_ZCOPY FORTRAN_ID( zcopy )
+
+// Value-type variants of dot
+#define BLAS_SDOT FORTRAN_ID( sdot )
+#define BLAS_DDOT FORTRAN_ID( ddot )
+
+// Value-type variants of dotc
+#define BLAS_CDOTC FORTRAN_ID( cdotc )
+#define BLAS_ZDOTC FORTRAN_ID( zdotc )
+
+// Value-type variants of dotu
+#define BLAS_CDOTU FORTRAN_ID( cdotu )
+#define BLAS_ZDOTU FORTRAN_ID( zdotu )
+
+// Value-type variants of drot
+#define BLAS_ZDROT FORTRAN_ID( zdrot )
+
+// Value-type variants of nrm2
+#define BLAS_SNRM2 FORTRAN_ID( snrm2 )
+#define BLAS_DNRM2 FORTRAN_ID( dnrm2 )
+
+// Value-type variants of rot
+#define BLAS_SROT FORTRAN_ID( srot )
+#define BLAS_DROT FORTRAN_ID( drot )
+
+// Value-type variants of rotg
+#define BLAS_SROTG FORTRAN_ID( srotg )
+#define BLAS_DROTG FORTRAN_ID( drotg )
+#define BLAS_CROTG FORTRAN_ID( crotg )
+#define BLAS_ZROTG FORTRAN_ID( zrotg )
+
+// Value-type variants of rotm
+#define BLAS_SROTM FORTRAN_ID( srotm )
+#define BLAS_DROTM FORTRAN_ID( drotm )
+
+// Value-type variants of rotmg
+#define BLAS_SROTMG FORTRAN_ID( srotmg )
+#define BLAS_DROTMG FORTRAN_ID( drotmg )
+
+// Value-type variants of scal
+#define BLAS_SSCAL FORTRAN_ID( sscal )
+#define BLAS_DSCAL FORTRAN_ID( dscal )
+#define BLAS_CSCAL FORTRAN_ID( cscal )
+#define BLAS_ZSCAL FORTRAN_ID( zscal )
+
+// Value-type variants of sdot
+#define BLAS_DSDOT FORTRAN_ID( dsdot )
+
+// Value-type variants of srot
+#define BLAS_CSROT FORTRAN_ID( csrot )
+
+// Value-type variants of swap
+#define BLAS_SSWAP FORTRAN_ID( sswap )
+#define BLAS_DSWAP FORTRAN_ID( dswap )
+#define BLAS_CSWAP FORTRAN_ID( cswap )
+#define BLAS_ZSWAP FORTRAN_ID( zswap )
+
+//
+// BLAS level2 routines
+//
+
+// Value-type variants of gbmv
+#define BLAS_SGBMV FORTRAN_ID( sgbmv )
+#define BLAS_DGBMV FORTRAN_ID( dgbmv )
+#define BLAS_CGBMV FORTRAN_ID( cgbmv )
+#define BLAS_ZGBMV FORTRAN_ID( zgbmv )
+
+// Value-type variants of gemv
+#define BLAS_SGEMV FORTRAN_ID( sgemv )
+#define BLAS_DGEMV FORTRAN_ID( dgemv )
+#define BLAS_CGEMV FORTRAN_ID( cgemv )
+#define BLAS_ZGEMV FORTRAN_ID( zgemv )
+
+// Value-type variants of ger
+#define BLAS_SGER FORTRAN_ID( sger )
+#define BLAS_DGER FORTRAN_ID( dger )
+
+// Value-type variants of gerc
+#define BLAS_CGERC FORTRAN_ID( cgerc )
+#define BLAS_ZGERC FORTRAN_ID( zgerc )
+
+// Value-type variants of geru
+#define BLAS_CGERU FORTRAN_ID( cgeru )
+#define BLAS_ZGERU FORTRAN_ID( zgeru )
+
+// Value-type variants of hbmv
+#define BLAS_CHBMV FORTRAN_ID( chbmv )
+#define BLAS_ZHBMV FORTRAN_ID( zhbmv )
+
+// Value-type variants of hemv
+#define BLAS_CHEMV FORTRAN_ID( chemv )
+#define BLAS_ZHEMV FORTRAN_ID( zhemv )
+
+// Value-type variants of her
+#define BLAS_CHER FORTRAN_ID( cher )
+#define BLAS_ZHER FORTRAN_ID( zher )
+
+// Value-type variants of her2
+#define BLAS_CHER2 FORTRAN_ID( cher2 )
+#define BLAS_ZHER2 FORTRAN_ID( zher2 )
+
+// Value-type variants of hpmv
+#define BLAS_CHPMV FORTRAN_ID( chpmv )
+#define BLAS_ZHPMV FORTRAN_ID( zhpmv )
+
+// Value-type variants of hpr
+#define BLAS_CHPR FORTRAN_ID( chpr )
+#define BLAS_ZHPR FORTRAN_ID( zhpr )
+
+// Value-type variants of hpr2
+#define BLAS_CHPR2 FORTRAN_ID( chpr2 )
+#define BLAS_ZHPR2 FORTRAN_ID( zhpr2 )
+
+// Value-type variants of sbmv
+#define BLAS_SSBMV FORTRAN_ID( ssbmv )
+#define BLAS_DSBMV FORTRAN_ID( dsbmv )
+
+// Value-type variants of spmv
+#define BLAS_SSPMV FORTRAN_ID( sspmv )
+#define BLAS_DSPMV FORTRAN_ID( dspmv )
+
+// Value-type variants of spr
+#define BLAS_SSPR FORTRAN_ID( sspr )
+#define BLAS_DSPR FORTRAN_ID( dspr )
+
+// Value-type variants of spr2
+#define BLAS_SSPR2 FORTRAN_ID( sspr2 )
+#define BLAS_DSPR2 FORTRAN_ID( dspr2 )
+
+// Value-type variants of symv
+#define BLAS_SSYMV FORTRAN_ID( ssymv )
+#define BLAS_DSYMV FORTRAN_ID( dsymv )
+
+// Value-type variants of syr
+#define BLAS_SSYR FORTRAN_ID( ssyr )
+#define BLAS_DSYR FORTRAN_ID( dsyr )
+
+// Value-type variants of syr2
+#define BLAS_SSYR2 FORTRAN_ID( ssyr2 )
+#define BLAS_DSYR2 FORTRAN_ID( dsyr2 )
+
+// Value-type variants of tbmv
+#define BLAS_STBMV FORTRAN_ID( stbmv )
+#define BLAS_DTBMV FORTRAN_ID( dtbmv )
+#define BLAS_CTBMV FORTRAN_ID( ctbmv )
+#define BLAS_ZTBMV FORTRAN_ID( ztbmv )
+
+// Value-type variants of tbsv
+#define BLAS_STBSV FORTRAN_ID( stbsv )
+#define BLAS_DTBSV FORTRAN_ID( dtbsv )
+#define BLAS_CTBSV FORTRAN_ID( ctbsv )
+#define BLAS_ZTBSV FORTRAN_ID( ztbsv )
+
+// Value-type variants of tpmv
+#define BLAS_STPMV FORTRAN_ID( stpmv )
+#define BLAS_DTPMV FORTRAN_ID( dtpmv )
+#define BLAS_CTPMV FORTRAN_ID( ctpmv )
+#define BLAS_ZTPMV FORTRAN_ID( ztpmv )
+
+// Value-type variants of tpsv
+#define BLAS_STPSV FORTRAN_ID( stpsv )
+#define BLAS_DTPSV FORTRAN_ID( dtpsv )
+#define BLAS_CTPSV FORTRAN_ID( ctpsv )
+#define BLAS_ZTPSV FORTRAN_ID( ztpsv )
+
+// Value-type variants of trmv
+#define BLAS_STRMV FORTRAN_ID( strmv )
+#define BLAS_DTRMV FORTRAN_ID( dtrmv )
+#define BLAS_CTRMV FORTRAN_ID( ctrmv )
+#define BLAS_ZTRMV FORTRAN_ID( ztrmv )
+
+// Value-type variants of trsv
+#define BLAS_STRSV FORTRAN_ID( strsv )
+#define BLAS_DTRSV FORTRAN_ID( dtrsv )
+#define BLAS_CTRSV FORTRAN_ID( ctrsv )
+#define BLAS_ZTRSV FORTRAN_ID( ztrsv )
+
+//
+// BLAS level3 routines
+//
+
+// Value-type variants of gemm
+#define BLAS_SGEMM FORTRAN_ID( sgemm )
+#define BLAS_DGEMM FORTRAN_ID( dgemm )
+#define BLAS_CGEMM FORTRAN_ID( cgemm )
+#define BLAS_ZGEMM FORTRAN_ID( zgemm )
+
+// Value-type variants of hemm
+#define BLAS_CHEMM FORTRAN_ID( chemm )
+#define BLAS_ZHEMM FORTRAN_ID( zhemm )
+
+// Value-type variants of her2k
+#define BLAS_CHER2K FORTRAN_ID( cher2k )
+#define BLAS_ZHER2K FORTRAN_ID( zher2k )
+
+// Value-type variants of herk
+#define BLAS_CHERK FORTRAN_ID( cherk )
+#define BLAS_ZHERK FORTRAN_ID( zherk )
+
+// Value-type variants of symm
+#define BLAS_SSYMM FORTRAN_ID( ssymm )
+#define BLAS_DSYMM FORTRAN_ID( dsymm )
+#define BLAS_CSYMM FORTRAN_ID( csymm )
+#define BLAS_ZSYMM FORTRAN_ID( zsymm )
+
+// Value-type variants of syr2k
+#define BLAS_SSYR2K FORTRAN_ID( ssyr2k )
+#define BLAS_DSYR2K FORTRAN_ID( dsyr2k )
+#define BLAS_CSYR2K FORTRAN_ID( csyr2k )
+#define BLAS_ZSYR2K FORTRAN_ID( zsyr2k )
+
+// Value-type variants of syrk
+#define BLAS_SSYRK FORTRAN_ID( ssyrk )
+#define BLAS_DSYRK FORTRAN_ID( dsyrk )
+#define BLAS_CSYRK FORTRAN_ID( csyrk )
+#define BLAS_ZSYRK FORTRAN_ID( zsyrk )
+
+// Value-type variants of trmm
+#define BLAS_STRMM FORTRAN_ID( strmm )
+#define BLAS_DTRMM FORTRAN_ID( dtrmm )
+#define BLAS_CTRMM FORTRAN_ID( ctrmm )
+#define BLAS_ZTRMM FORTRAN_ID( ztrmm )
+
+// Value-type variants of trsm
+#define BLAS_STRSM FORTRAN_ID( strsm )
+#define BLAS_DTRSM FORTRAN_ID( dtrsm )
+#define BLAS_CTRSM FORTRAN_ID( ctrsm )
+#define BLAS_ZTRSM FORTRAN_ID( ztrsm )
+
+
+
+#endif
+

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/asum.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/asum.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,64 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_ASUM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_ASUM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline float asum( integer_t const n, float* x, integer_t const incx ) {
+ return BLAS_SASUM( &n, x, &incx );
+ }
+ inline double asum( integer_t const n, double* x, integer_t const incx ) {
+ return BLAS_DASUM( &n, x, &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct asum_impl {
+
+ typedef ValueType value_type;
+ typedef value_type return_type;
+
+ // templated specialization
+ template< typename VectorX >
+ static return_type compute( VectorX& x ) {
+ return detail::asum( traits::vector_size(x),
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call asum
+template< typename VectorX >
+inline integer_t asum( VectorX& x ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ return asum_impl< value_type >::compute( x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/axpy.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/axpy.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_AXPY_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_AXPY_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void axpy( integer_t const n, float const a, float* x,
+ integer_t const incx, float* y, integer_t const incy ) {
+ BLAS_SAXPY( &n, &a, x, &incx, y, &incy );
+ }
+ inline void axpy( integer_t const n, double const a, double* x,
+ integer_t const incx, double* y, integer_t const incy ) {
+ BLAS_DAXPY( &n, &a, x, &incx, y, &incy );
+ }
+ inline void axpy( integer_t const n, traits::complex_f const a,
+ traits::complex_f* x, integer_t const incx, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CAXPY( &n, traits::complex_ptr(&a), traits::complex_ptr(x),
+ &incx, traits::complex_ptr(y), &incy );
+ }
+ inline void axpy( integer_t const n, traits::complex_d const a,
+ traits::complex_d* x, integer_t const incx, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZAXPY( &n, traits::complex_ptr(&a), traits::complex_ptr(x),
+ &incx, traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct axpy_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( traits::complex_d const a, VectorX& x,
+ VectorY& y ) {
+ detail::axpy( traits::vector_size(x), a,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call axpy
+template< typename VectorX, typename VectorY >
+inline integer_t axpy( traits::complex_d const a, VectorX& x,
+ VectorY& y ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ axpy_impl< value_type >::compute( a, x, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/copy.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/copy.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_COPY_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_COPY_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void copy( integer_t const n, float* x, integer_t const incx,
+ float* y, integer_t const incy ) {
+ BLAS_SCOPY( &n, x, &incx, y, &incy );
+ }
+ inline void copy( integer_t const n, double* x, integer_t const incx,
+ double* y, integer_t const incy ) {
+ BLAS_DCOPY( &n, x, &incx, y, &incy );
+ }
+ inline void copy( integer_t const n, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CCOPY( &n, traits::complex_ptr(x), &incx, traits::complex_ptr(y),
+ &incy );
+ }
+ inline void copy( integer_t const n, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZCOPY( &n, traits::complex_ptr(x), &incx, traits::complex_ptr(y),
+ &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct copy_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( VectorX& x, VectorY& y ) {
+ detail::copy( traits::vector_size(x), traits::vector_storage(x),
+ traits::vector_stride(x), traits::vector_storage(y),
+ traits::vector_stride(y) );
+ }
+};
+
+// template function to call copy
+template< typename VectorX, typename VectorY >
+inline integer_t copy( VectorX& x, VectorY& y ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ copy_impl< value_type >::compute( x, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dot.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dot.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DOT_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DOT_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline float dot( integer_t const n, float* x, integer_t const incx,
+ float* y, integer_t const incy ) {
+ return BLAS_SDOT( &n, x, &incx, y, &incy );
+ }
+ inline double dot( integer_t const n, double* x, integer_t const incx,
+ double* y, integer_t const incy ) {
+ return BLAS_DDOT( &n, x, &incx, y, &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct dot_impl {
+
+ typedef ValueType value_type;
+ typedef value_type return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( VectorX& x, VectorY& y ) {
+ return detail::dot( traits::vector_size(x),
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call dot
+template< typename VectorX, typename VectorY >
+inline integer_t dot( VectorX& x, VectorY& y ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ return dot_impl< value_type >::compute( x, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dotc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dotc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DOTC_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DOTC_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline fcomplex_t dotc( integer_t const n, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y,
+ integer_t const incy ) {
+ return BLAS_CDOTC( &n, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(y), &incy );
+ }
+ inline dcomplex_t dotc( integer_t const n, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y,
+ integer_t const incy ) {
+ return BLAS_ZDOTC( &n, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct dotc_impl {
+
+ typedef ValueType value_type;
+ typedef value_type return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( VectorX& x, VectorY& y ) {
+ return detail::dotc( traits::vector_size(x),
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call dotc
+template< typename VectorX, typename VectorY >
+inline integer_t dotc( VectorX& x, VectorY& y ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ return dotc_impl< value_type >::compute( x, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dotu.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/dotu.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DOTU_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DOTU_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline fcomplex_t dotu( integer_t const n, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y,
+ integer_t const incy ) {
+ return BLAS_CDOTU( &n, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(y), &incy );
+ }
+ inline dcomplex_t dotu( integer_t const n, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y,
+ integer_t const incy ) {
+ return BLAS_ZDOTU( &n, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct dotu_impl {
+
+ typedef ValueType value_type;
+ typedef value_type return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( VectorX& x, VectorY& y ) {
+ return detail::dotu( traits::vector_size(x),
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call dotu
+template< typename VectorX, typename VectorY >
+inline integer_t dotu( VectorX& x, VectorY& y ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ return dotu_impl< value_type >::compute( x, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/drot.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/drot.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,68 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DROT_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DROT_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void drot( integer_t const n, traits::complex_d* cx,
+ integer_t const incx, traits::complex_d* cy, integer_t const incy,
+ double const c, double const s ) {
+ BLAS_ZDROT( &n, traits::complex_ptr(cx), &incx,
+ traits::complex_ptr(cy), &incy, &c, &s );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct drot_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorCX, typename VectorCY >
+ static return_type compute( integer_t const n, VectorCX& cx, VectorCY& cy,
+ real_type const c, real_type const s ) {
+ detail::drot( n, traits::vector_storage(cx),
+ traits::vector_stride(cx), traits::vector_storage(cy),
+ traits::vector_stride(cy), c, s );
+ }
+};
+
+// template function to call drot
+template< typename VectorCX, typename VectorCY >
+inline integer_t drot( integer_t const n, VectorCX& cx, VectorCY& cy,
+ typename traits::vector_traits< VectorCX >::value_type const c,
+ typename traits::vector_traits< VectorCX >::value_type const s ) {
+ typedef typename traits::vector_traits< VectorCX >::value_type value_type;
+ drot_impl< value_type >::compute( n, cx, cy, c, s );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/nrm2.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/nrm2.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,64 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_NRM2_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_NRM2_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline float nrm2( integer_t const n, float* x, integer_t const incx ) {
+ return BLAS_SNRM2( &n, x, &incx );
+ }
+ inline double nrm2( integer_t const n, double* x, integer_t const incx ) {
+ return BLAS_DNRM2( &n, x, &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct nrm2_impl {
+
+ typedef ValueType value_type;
+ typedef value_type return_type;
+
+ // templated specialization
+ template< typename VectorX >
+ static return_type compute( VectorX& x ) {
+ return detail::nrm2( traits::vector_size(x),
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call nrm2
+template< typename VectorX >
+inline integer_t nrm2( VectorX& x ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ return nrm2_impl< value_type >::compute( x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rot.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rot.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_ROT_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_ROT_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void rot( integer_t const n, float* x, integer_t const incx,
+ float* y, integer_t const incy, float const c, float const s ) {
+ BLAS_SROT( &n, x, &incx, y, &incy, &c, &s );
+ }
+ inline void rot( integer_t const n, double* x, integer_t const incx,
+ double* y, integer_t const incy, double const c, double const s ) {
+ BLAS_DROT( &n, x, &incx, y, &incy, &c, &s );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct rot_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( VectorX& x, VectorY& y, real_type const c,
+ real_type const s ) {
+ detail::rot( traits::vector_size(x), traits::vector_storage(x),
+ traits::vector_stride(x), traits::vector_storage(y),
+ traits::vector_stride(y), c, s );
+ }
+};
+
+// template function to call rot
+template< typename VectorX, typename VectorY >
+inline integer_t rot( VectorX& x, VectorY& y,
+ typename traits::vector_traits< VectorX >::value_type const c,
+ typename traits::vector_traits< VectorX >::value_type const s ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ rot_impl< value_type >::compute( x, y, c, s );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotg.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotg.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_ROTG_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_ROTG_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void rotg( float& a, float& b, float& c, float& s ) {
+ BLAS_SROTG( &a, &b, &c, &s );
+ }
+ inline void rotg( double& a, double& b, double& c, double& s ) {
+ BLAS_DROTG( &a, &b, &c, &s );
+ }
+ inline void rotg( traits::complex_f& a, traits::complex_f& b, float& c,
+ traits::complex_f& s ) {
+ BLAS_CROTG( traits::complex_ptr(&a), traits::complex_ptr(&b), &c,
+ traits::complex_ptr(&s) );
+ }
+ inline void rotg( traits::complex_d& a, traits::complex_d& b, double& c,
+ traits::complex_d& s ) {
+ BLAS_ZROTG( traits::complex_ptr(&a), traits::complex_ptr(&b), &c,
+ traits::complex_ptr(&s) );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct rotg_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< >
+ static return_type compute( traits::complex_d& a, traits::complex_d& b,
+ real_type& c, traits::complex_d& s ) {
+ detail::rotg( a, b, c, s );
+ }
+};
+
+// template function to call rotg
+template< >
+inline integer_t rotg( traits::complex_d& a, traits::complex_d& b,
+ typename traits::TODO_traits< TODO >::value_type& c,
+ traits::complex_d& s ) {
+ typedef typename traits::TODO_traits< TODO >::value_type value_type;
+ rotg_impl< value_type >::compute( a, b, c, s );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_ROTM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_ROTM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void rotm( integer_t const n, float* x, integer_t const incx,
+ float* y, integer_t const incy, float* param ) {
+ BLAS_SROTM( &n, x, &incx, y, &incy, param );
+ }
+ inline void rotm( integer_t const n, double* x, integer_t const incx,
+ double* y, integer_t const incy, double* param ) {
+ BLAS_DROTM( &n, x, &incx, y, &incy, param );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct rotm_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename VectorPARAM >
+ static return_type compute( integer_t const n, VectorX& x,
+ integer_t const incx, VectorY& y, integer_t const incy,
+ VectorPARAM& param ) {
+ detail::rotm( n, traits::vector_storage(x), incx,
+ traits::vector_storage(y), incy,
+ traits::vector_storage(param) );
+ }
+};
+
+// template function to call rotm
+template< typename VectorX, typename VectorY, typename VectorPARAM >
+inline integer_t rotm( integer_t const n, VectorX& x,
+ integer_t const incx, VectorY& y, integer_t const incy,
+ VectorPARAM& param ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ rotm_impl< value_type >::compute( n, x, incx, y, incy, param );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotmg.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/rotmg.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_ROTMG_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_ROTMG_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void rotmg( float& d1, float& d2, float& x1, float const y1,
+ float* sparam ) {
+ BLAS_SROTMG( &d1, &d2, &x1, &y1, sparam );
+ }
+ inline void rotmg( double& d1, double& d2, double& x1, double const y1,
+ double* dparam ) {
+ BLAS_DROTMG( &d1, &d2, &x1, &y1, dparam );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct rotmg_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorDPARAM >
+ static return_type compute( real_type& d1, real_type& d2, real_type& x1,
+ real_type const y1, VectorDPARAM& dparam ) {
+ detail::rotmg( d1, d2, x1, y1, traits::vector_storage(dparam) );
+ }
+};
+
+// template function to call rotmg
+template< typename VectorDPARAM >
+
+ inline integer_t rotmg( typename traits::vector_traits< VectorDPARAM >::value_type& d1,
+ typename traits::vector_traits< VectorDPARAM >::value_type& d2,
+ typename traits::vector_traits< VectorDPARAM >::value_type& x1,
+ typename traits::vector_traits< VectorDPARAM >::value_type const y1,
+ VectorDPARAM& dparam ) {
+ typedef typename traits::vector_traits< VectorDPARAM >::value_type value_type;
+ rotmg_impl< value_type >::compute( d1, d2, x1, y1, dparam );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/scal.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/scal.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SCAL_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SCAL_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void scal( integer_t const n, float const a, float* x,
+ integer_t const incx ) {
+ BLAS_SSCAL( &n, &a, x, &incx );
+ }
+ inline void scal( integer_t const n, double const a, double* x,
+ integer_t const incx ) {
+ BLAS_DSCAL( &n, &a, x, &incx );
+ }
+ inline void scal( integer_t const n, traits::complex_f const a,
+ traits::complex_f* x, integer_t const incx ) {
+ BLAS_CSCAL( &n, traits::complex_ptr(&a), traits::complex_ptr(x),
+ &incx );
+ }
+ inline void scal( integer_t const n, traits::complex_d const a,
+ traits::complex_d* x, integer_t const incx ) {
+ BLAS_ZSCAL( &n, traits::complex_ptr(&a), traits::complex_ptr(x),
+ &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct scal_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX >
+ static return_type compute( traits::complex_d const a, VectorX& x ) {
+ detail::scal( traits::vector_size(x), a,
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call scal
+template< typename VectorX >
+inline integer_t scal( traits::complex_d const a, VectorX& x ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ scal_impl< value_type >::compute( a, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/sdot.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/sdot.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,64 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SDOT_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SDOT_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline double sdot( integer_t const n, float* sx, integer_t const incx,
+ float* sy, integer_t const incy ) {
+ return BLAS_DSDOT( &n, sx, &incx, sy, &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sdot_impl {
+
+ typedef ValueType value_type;
+ typedef value_type return_type;
+
+ // templated specialization
+ template< typename VectorSX, typename VectorSY >
+ static return_type compute( integer_t const n, VectorSX& sx,
+ integer_t const incx, VectorSY& sy, integer_t const incy ) {
+ return detail::sdot( n, traits::vector_storage(sx), incx,
+ traits::vector_storage(sy), incy );
+ }
+};
+
+// template function to call sdot
+template< typename VectorSX, typename VectorSY >
+inline integer_t sdot( integer_t const n, VectorSX& sx,
+ integer_t const incx, VectorSY& sy, integer_t const incy ) {
+ typedef typename traits::vector_traits< VectorSX >::value_type value_type;
+ return sdot_impl< value_type >::compute( n, sx, incx, sy, incy );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/srot.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/srot.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,68 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SROT_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SROT_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void srot( integer_t const n, traits::complex_f* cx,
+ integer_t const incx, traits::complex_f* cy, integer_t const incy,
+ float const c, float const s ) {
+ BLAS_CSROT( &n, traits::complex_ptr(cx), &incx,
+ traits::complex_ptr(cy), &incy, &c, &s );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct srot_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorCX, typename VectorCY >
+ static return_type compute( integer_t const n, VectorCX& cx, VectorCY& cy,
+ real_type const c, real_type const s ) {
+ detail::srot( n, traits::vector_storage(cx),
+ traits::vector_stride(cx), traits::vector_storage(cy),
+ traits::vector_stride(cy), c, s );
+ }
+};
+
+// template function to call srot
+template< typename VectorCX, typename VectorCY >
+inline integer_t srot( integer_t const n, VectorCX& cx, VectorCY& cy,
+ typename traits::vector_traits< VectorCX >::value_type const c,
+ typename traits::vector_traits< VectorCX >::value_type const s ) {
+ typedef typename traits::vector_traits< VectorCX >::value_type value_type;
+ srot_impl< value_type >::compute( n, cx, cy, c, s );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/swap.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level1/swap.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SWAP_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SWAP_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void swap( integer_t const n, float* x, integer_t const incx,
+ float* y, integer_t const incy ) {
+ BLAS_SSWAP( &n, x, &incx, y, &incy );
+ }
+ inline void swap( integer_t const n, double* x, integer_t const incx,
+ double* y, integer_t const incy ) {
+ BLAS_DSWAP( &n, x, &incx, y, &incy );
+ }
+ inline void swap( integer_t const n, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CSWAP( &n, traits::complex_ptr(x), &incx, traits::complex_ptr(y),
+ &incy );
+ }
+ inline void swap( integer_t const n, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZSWAP( &n, traits::complex_ptr(x), &incx, traits::complex_ptr(y),
+ &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct swap_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY >
+ static return_type compute( VectorX& x, VectorY& y ) {
+ detail::swap( traits::vector_size(x), traits::vector_storage(x),
+ traits::vector_stride(x), traits::vector_storage(y),
+ traits::vector_stride(y) );
+ }
+};
+
+// template function to call swap
+template< typename VectorX, typename VectorY >
+inline integer_t swap( VectorX& x, VectorY& y ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ swap_impl< value_type >::compute( x, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gbmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gbmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,100 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_GBMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_GBMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void gbmv( char const trans, integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, float const alpha,
+ float* a, integer_t const lda, float* x, integer_t const incx,
+ float const beta, float* y, integer_t const incy ) {
+ BLAS_SGBMV( &trans, &m, &n, &kl, &ku, &alpha, a, &lda, x, &incx,
+ &beta, y, &incy );
+ }
+ inline void gbmv( char const trans, integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, double const alpha,
+ double* a, integer_t const lda, double* x, integer_t const incx,
+ double const beta, double* y, integer_t const incy ) {
+ BLAS_DGBMV( &trans, &m, &n, &kl, &ku, &alpha, a, &lda, x, &incx,
+ &beta, y, &incy );
+ }
+ inline void gbmv( char const trans, integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, integer_t const incx,
+ traits::complex_f const beta, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CGBMV( &trans, &m, &n, &kl, &ku, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+ inline void gbmv( char const trans, integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, integer_t const incx,
+ traits::complex_d const beta, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZGBMV( &trans, &m, &n, &kl, &ku, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gbmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorY >
+ static return_type compute( char const trans, integer_t const kl,
+ integer_t const ku, traits::complex_d const alpha, MatrixA& a,
+ VectorX& x, traits::complex_d const beta, VectorY& y ) {
+ detail::gbmv( trans, traits::matrix_size1(a),
+ traits::matrix_size2(a), kl, ku, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x), beta,
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call gbmv
+template< typename MatrixA, typename VectorX, typename VectorY >
+inline integer_t gbmv( char const trans, integer_t const kl,
+ integer_t const ku, traits::complex_d const alpha, MatrixA& a,
+ VectorX& x, traits::complex_d const beta, VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ gbmv_impl< value_type >::compute( trans, kl, ku, alpha, a, x, beta,
+ y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gemv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gemv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_GEMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_GEMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void gemv( char const trans, integer_t const m, integer_t const n,
+ float const alpha, float* a, integer_t const lda, float* x,
+ integer_t const incx, float const beta, float* y,
+ integer_t const incy ) {
+ BLAS_SGEMV( &trans, &m, &n, &alpha, a, &lda, x, &incx, &beta, y,
+ &incy );
+ }
+ inline void gemv( char const trans, integer_t const m, integer_t const n,
+ double const alpha, double* a, integer_t const lda, double* x,
+ integer_t const incx, double const beta, double* y,
+ integer_t const incy ) {
+ BLAS_DGEMV( &trans, &m, &n, &alpha, a, &lda, x, &incx, &beta, y,
+ &incy );
+ }
+ inline void gemv( char const trans, integer_t const m, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, integer_t const incx,
+ traits::complex_f const beta, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CGEMV( &trans, &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+ inline void gemv( char const trans, integer_t const m, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, integer_t const incx,
+ traits::complex_d const beta, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZGEMV( &trans, &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gemv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorY >
+ static return_type compute( char const trans,
+ traits::complex_d const alpha, MatrixA& a, VectorX& x,
+ traits::complex_d const beta, VectorY& y ) {
+ detail::gemv( trans, traits::matrix_size1(a),
+ traits::matrix_size2(a), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(x),
+ traits::vector_stride(x), beta, traits::vector_storage(y),
+ traits::vector_stride(y) );
+ }
+};
+
+// template function to call gemv
+template< typename MatrixA, typename VectorX, typename VectorY >
+inline integer_t gemv( char const trans, traits::complex_d const alpha,
+ MatrixA& a, VectorX& x, traits::complex_d const beta, VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ gemv_impl< value_type >::compute( trans, alpha, a, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/ger.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/ger.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_GER_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_GER_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void ger( integer_t const m, integer_t const n, float const alpha,
+ float* x, integer_t const incx, float* y, integer_t const incy,
+ float* a, integer_t const lda ) {
+ BLAS_SGER( &m, &n, &alpha, x, &incx, y, &incy, a, &lda );
+ }
+ inline void ger( integer_t const m, integer_t const n, double const alpha,
+ double* x, integer_t const incx, double* y, integer_t const incy,
+ double* a, integer_t const lda ) {
+ BLAS_DGER( &m, &n, &alpha, x, &incx, y, &incy, a, &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ger_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixA >
+ static return_type compute( real_type const alpha, VectorX& x, VectorY& y,
+ MatrixA& a ) {
+ detail::ger( traits::matrix_size1(a), traits::matrix_size2(a),
+ alpha, traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call ger
+template< typename VectorX, typename VectorY, typename MatrixA >
+
+ inline integer_t ger( typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, VectorY& y, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ ger_impl< value_type >::compute( alpha, x, y, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gerc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/gerc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,78 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_GERC_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_GERC_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void gerc( integer_t const m, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y, integer_t const incy,
+ traits::complex_f* a, integer_t const lda ) {
+ BLAS_CGERC( &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(a), &lda );
+ }
+ inline void gerc( integer_t const m, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y, integer_t const incy,
+ traits::complex_d* a, integer_t const lda ) {
+ BLAS_ZGERC( &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(a), &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gerc_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixA >
+ static return_type compute( traits::complex_d const alpha, VectorX& x,
+ VectorY& y, MatrixA& a ) {
+ detail::gerc( traits::matrix_size1(a), traits::matrix_size2(a),
+ alpha, traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call gerc
+template< typename VectorX, typename VectorY, typename MatrixA >
+inline integer_t gerc( traits::complex_d const alpha, VectorX& x,
+ VectorY& y, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ gerc_impl< value_type >::compute( alpha, x, y, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/geru.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/geru.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,78 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_GERU_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_GERU_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void geru( integer_t const m, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y, integer_t const incy,
+ traits::complex_f* a, integer_t const lda ) {
+ BLAS_CGERU( &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(a), &lda );
+ }
+ inline void geru( integer_t const m, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y, integer_t const incy,
+ traits::complex_d* a, integer_t const lda ) {
+ BLAS_ZGERU( &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(a), &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct geru_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixA >
+ static return_type compute( traits::complex_d const alpha, VectorX& x,
+ VectorY& y, MatrixA& a ) {
+ detail::geru( traits::matrix_size1(a), traits::matrix_size2(a),
+ alpha, traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call geru
+template< typename VectorX, typename VectorY, typename MatrixA >
+inline integer_t geru( traits::complex_d const alpha, VectorX& x,
+ VectorY& y, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ geru_impl< value_type >::compute( alpha, x, y, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hbmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hbmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,82 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HBMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HBMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void hbmv( char const uplo, integer_t const n, integer_t const k,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, integer_t const incx,
+ traits::complex_f const beta, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CHBMV( &uplo, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+ inline void hbmv( char const uplo, integer_t const n, integer_t const k,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, integer_t const incx,
+ traits::complex_d const beta, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZHBMV( &uplo, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorY >
+ static return_type compute( char const uplo, integer_t const k,
+ traits::complex_d const alpha, MatrixA& a, VectorX& x,
+ traits::complex_d const beta, VectorY& y ) {
+ detail::hbmv( uplo, traits::matrix_size2(a), k, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x), beta,
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call hbmv
+template< typename MatrixA, typename VectorX, typename VectorY >
+inline integer_t hbmv( char const uplo, integer_t const k,
+ traits::complex_d const alpha, MatrixA& a, VectorX& x,
+ traits::complex_d const beta, VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ hbmv_impl< value_type >::compute( uplo, k, alpha, a, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hemv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hemv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HEMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HEMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void hemv( char const uplo, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, integer_t const incx,
+ traits::complex_f const beta, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CHEMV( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+ inline void hemv( char const uplo, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, integer_t const incx,
+ traits::complex_d const beta, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZHEMV( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hemv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorY >
+ static return_type compute( char const uplo,
+ traits::complex_d const alpha, MatrixA& a, VectorX& x,
+ traits::complex_d const beta, VectorY& y ) {
+ detail::hemv( uplo, traits::matrix_size2(a), alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x), beta,
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call hemv
+template< typename MatrixA, typename VectorX, typename VectorY >
+inline integer_t hemv( char const uplo, traits::complex_d const alpha,
+ MatrixA& a, VectorX& x, traits::complex_d const beta, VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ hemv_impl< value_type >::compute( uplo, alpha, a, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/her.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/her.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HER_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HER_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void her( char const uplo, integer_t const n, float const alpha,
+ traits::complex_f* x, integer_t const incx, traits::complex_f* a,
+ integer_t const lda ) {
+ BLAS_CHER( &uplo, &n, &alpha, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(a), &lda );
+ }
+ inline void her( char const uplo, integer_t const n, double const alpha,
+ traits::complex_d* x, integer_t const incx, traits::complex_d* a,
+ integer_t const lda ) {
+ BLAS_ZHER( &uplo, &n, &alpha, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(a), &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct her_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename MatrixA >
+ static return_type compute( char const uplo, real_type const alpha,
+ VectorX& x, MatrixA& a ) {
+ detail::her( uplo, traits::matrix_size2(a), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call her
+template< typename VectorX, typename MatrixA >
+inline integer_t her( char const uplo,
+ typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ her_impl< value_type >::compute( uplo, alpha, x, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/her2.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/her2.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HER2_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HER2_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void her2( char const uplo, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y, integer_t const incy,
+ traits::complex_f* a, integer_t const lda ) {
+ BLAS_CHER2( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(a), &lda );
+ }
+ inline void her2( char const uplo, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y, integer_t const incy,
+ traits::complex_d* a, integer_t const lda ) {
+ BLAS_ZHER2( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(a), &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct her2_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixA >
+ static return_type compute( char const uplo,
+ traits::complex_d const alpha, VectorX& x, VectorY& y,
+ MatrixA& a ) {
+ detail::her2( uplo, traits::matrix_size2(a), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call her2
+template< typename VectorX, typename VectorY, typename MatrixA >
+inline integer_t her2( char const uplo, traits::complex_d const alpha,
+ VectorX& x, VectorY& y, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ her2_impl< value_type >::compute( uplo, alpha, x, y, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HPMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HPMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void hpmv( char const uplo, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* ap,
+ traits::complex_f* x, integer_t const incx,
+ traits::complex_f const beta, traits::complex_f* y,
+ integer_t const incy ) {
+ BLAS_CHPMV( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(ap), traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+ inline void hpmv( char const uplo, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* ap,
+ traits::complex_d* x, integer_t const incx,
+ traits::complex_d const beta, traits::complex_d* y,
+ integer_t const incy ) {
+ BLAS_ZHPMV( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(ap), traits::complex_ptr(x), &incx,
+ traits::complex_ptr(&beta), traits::complex_ptr(y), &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorX, typename VectorY >
+ static return_type compute( char const uplo,
+ traits::complex_d const alpha, MatrixAP& ap, VectorX& x,
+ traits::complex_d const beta, VectorY& y ) {
+ detail::hpmv( uplo, traits::matrix_size2(ap), alpha,
+ traits::matrix_storage(ap), traits::vector_storage(x),
+ traits::vector_stride(x), beta, traits::vector_storage(y),
+ traits::vector_stride(y) );
+ }
+};
+
+// template function to call hpmv
+template< typename MatrixAP, typename VectorX, typename VectorY >
+inline integer_t hpmv( char const uplo, traits::complex_d const alpha,
+ MatrixAP& ap, VectorX& x, traits::complex_d const beta, VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ hpmv_impl< value_type >::compute( uplo, alpha, ap, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HPR_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HPR_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void hpr( char const uplo, integer_t const n, float const alpha,
+ traits::complex_f* x, integer_t const incx,
+ traits::complex_f* ap ) {
+ BLAS_CHPR( &uplo, &n, &alpha, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(ap) );
+ }
+ inline void hpr( char const uplo, integer_t const n, double const alpha,
+ traits::complex_d* x, integer_t const incx,
+ traits::complex_d* ap ) {
+ BLAS_ZHPR( &uplo, &n, &alpha, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(ap) );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpr_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename MatrixAP >
+ static return_type compute( char const uplo, real_type const alpha,
+ VectorX& x, MatrixAP& ap ) {
+ detail::hpr( uplo, traits::matrix_size2(ap), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::matrix_storage(ap) );
+ }
+};
+
+// template function to call hpr
+template< typename VectorX, typename MatrixAP >
+inline integer_t hpr( char const uplo,
+ typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, MatrixAP& ap ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ hpr_impl< value_type >::compute( uplo, alpha, x, ap );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpr2.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/hpr2.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HPR2_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HPR2_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void hpr2( char const uplo, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y, integer_t const incy,
+ traits::complex_f* ap ) {
+ BLAS_CHPR2( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(ap) );
+ }
+ inline void hpr2( char const uplo, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y, integer_t const incy,
+ traits::complex_d* ap ) {
+ BLAS_ZHPR2( &uplo, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(x), &incx, traits::complex_ptr(y), &incy,
+ traits::complex_ptr(ap) );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpr2_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixAP >
+ static return_type compute( char const uplo,
+ traits::complex_d const alpha, VectorX& x, VectorY& y,
+ MatrixAP& ap ) {
+ detail::hpr2( uplo, traits::matrix_size2(ap), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(ap) );
+ }
+};
+
+// template function to call hpr2
+template< typename VectorX, typename VectorY, typename MatrixAP >
+inline integer_t hpr2( char const uplo, traits::complex_d const alpha,
+ VectorX& x, VectorY& y, MatrixAP& ap ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ hpr2_impl< value_type >::compute( uplo, alpha, x, y, ap );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/sbmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/sbmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,80 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SBMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SBMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void sbmv( char const uplo, integer_t const n, integer_t const k,
+ float const alpha, float* a, integer_t const lda, float* x,
+ integer_t const incx, float const beta, float* y,
+ integer_t const incy ) {
+ BLAS_SSBMV( &uplo, &n, &k, &alpha, a, &lda, x, &incx, &beta, y,
+ &incy );
+ }
+ inline void sbmv( char const uplo, integer_t const n, integer_t const k,
+ double const alpha, double* a, integer_t const lda, double* x,
+ integer_t const incx, double const beta, double* y,
+ integer_t const incy ) {
+ BLAS_DSBMV( &uplo, &n, &k, &alpha, a, &lda, x, &incx, &beta, y,
+ &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorY >
+ static return_type compute( char const uplo, integer_t const k,
+ real_type const alpha, MatrixA& a, VectorX& x,
+ real_type const beta, VectorY& y ) {
+ detail::sbmv( uplo, traits::matrix_size2(a), k, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x), beta,
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call sbmv
+template< typename MatrixA, typename VectorX, typename VectorY >
+inline integer_t sbmv( char const uplo, integer_t const k,
+ typename traits::matrix_traits< MatrixA >::value_type const alpha,
+ MatrixA& a, VectorX& x,
+ typename traits::matrix_traits< MatrixA >::value_type const beta,
+ VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ sbmv_impl< value_type >::compute( uplo, k, alpha, a, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SPMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SPMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void spmv( char const uplo, integer_t const n, float const alpha,
+ float* ap, float* x, integer_t const incx, float const beta,
+ float* y, integer_t const incy ) {
+ BLAS_SSPMV( &uplo, &n, &alpha, ap, x, &incx, &beta, y, &incy );
+ }
+ inline void spmv( char const uplo, integer_t const n, double const alpha,
+ double* ap, double* x, integer_t const incx, double const beta,
+ double* y, integer_t const incy ) {
+ BLAS_DSPMV( &uplo, &n, &alpha, ap, x, &incx, &beta, y, &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorX, typename VectorY >
+ static return_type compute( char const uplo, real_type const alpha,
+ MatrixAP& ap, VectorX& x, real_type const beta, VectorY& y ) {
+ detail::spmv( uplo, traits::matrix_size2(ap), alpha,
+ traits::matrix_storage(ap), traits::vector_storage(x),
+ traits::vector_stride(x), beta, traits::vector_storage(y),
+ traits::vector_stride(y) );
+ }
+};
+
+// template function to call spmv
+template< typename MatrixAP, typename VectorX, typename VectorY >
+inline integer_t spmv( char const uplo,
+ typename traits::matrix_traits< MatrixAP >::value_type const alpha,
+ MatrixAP& ap, VectorX& x,
+ typename traits::matrix_traits< MatrixAP >::value_type const beta,
+ VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ spmv_impl< value_type >::compute( uplo, alpha, ap, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SPR_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SPR_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void spr( char const uplo, integer_t const n, float const alpha,
+ float* x, integer_t const incx, float* ap ) {
+ BLAS_SSPR( &uplo, &n, &alpha, x, &incx, ap );
+ }
+ inline void spr( char const uplo, integer_t const n, double const alpha,
+ double* x, integer_t const incx, double* ap ) {
+ BLAS_DSPR( &uplo, &n, &alpha, x, &incx, ap );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spr_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename MatrixAP >
+ static return_type compute( char const uplo, real_type const alpha,
+ VectorX& x, MatrixAP& ap ) {
+ detail::spr( uplo, traits::matrix_size2(ap), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::matrix_storage(ap) );
+ }
+};
+
+// template function to call spr
+template< typename VectorX, typename MatrixAP >
+inline integer_t spr( char const uplo,
+ typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, MatrixAP& ap ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ spr_impl< value_type >::compute( uplo, alpha, x, ap );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spr2.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/spr2.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SPR2_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SPR2_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void spr2( char const uplo, integer_t const n, float const alpha,
+ float* x, integer_t const incx, float* y, integer_t const incy,
+ float* ap ) {
+ BLAS_SSPR2( &uplo, &n, &alpha, x, &incx, y, &incy, ap );
+ }
+ inline void spr2( char const uplo, integer_t const n, double const alpha,
+ double* x, integer_t const incx, double* y, integer_t const incy,
+ double* ap ) {
+ BLAS_DSPR2( &uplo, &n, &alpha, x, &incx, y, &incy, ap );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spr2_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixAP >
+ static return_type compute( char const uplo, real_type const alpha,
+ VectorX& x, VectorY& y, MatrixAP& ap ) {
+ detail::spr2( uplo, traits::matrix_size2(ap), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(ap) );
+ }
+};
+
+// template function to call spr2
+template< typename VectorX, typename VectorY, typename MatrixAP >
+inline integer_t spr2( char const uplo,
+ typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, VectorY& y, MatrixAP& ap ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ spr2_impl< value_type >::compute( uplo, alpha, x, y, ap );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/symv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/symv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SYMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SYMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void symv( char const uplo, integer_t const n, float const alpha,
+ float* a, integer_t const lda, float* x, integer_t const incx,
+ float const beta, float* y, integer_t const incy ) {
+ BLAS_SSYMV( &uplo, &n, &alpha, a, &lda, x, &incx, &beta, y, &incy );
+ }
+ inline void symv( char const uplo, integer_t const n, double const alpha,
+ double* a, integer_t const lda, double* x, integer_t const incx,
+ double const beta, double* y, integer_t const incy ) {
+ BLAS_DSYMV( &uplo, &n, &alpha, a, &lda, x, &incx, &beta, y, &incy );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct symv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorY >
+ static return_type compute( char const uplo, real_type const alpha,
+ MatrixA& a, VectorX& x, real_type const beta, VectorY& y ) {
+ detail::symv( uplo, traits::matrix_size2(a), alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x), beta,
+ traits::vector_storage(y), traits::vector_stride(y) );
+ }
+};
+
+// template function to call symv
+template< typename MatrixA, typename VectorX, typename VectorY >
+inline integer_t symv( char const uplo,
+ typename traits::matrix_traits< MatrixA >::value_type const alpha,
+ MatrixA& a, VectorX& x,
+ typename traits::matrix_traits< MatrixA >::value_type const beta,
+ VectorY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ symv_impl< value_type >::compute( uplo, alpha, a, x, beta, y );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/syr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/syr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SYR_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SYR_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void syr( char const uplo, integer_t const n, float const alpha,
+ float* x, integer_t const incx, float* a, integer_t const lda ) {
+ BLAS_SSYR( &uplo, &n, &alpha, x, &incx, a, &lda );
+ }
+ inline void syr( char const uplo, integer_t const n, double const alpha,
+ double* x, integer_t const incx, double* a, integer_t const lda ) {
+ BLAS_DSYR( &uplo, &n, &alpha, x, &incx, a, &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syr_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename MatrixA >
+ static return_type compute( char const uplo, real_type const alpha,
+ VectorX& x, MatrixA& a ) {
+ detail::syr( uplo, traits::matrix_size2(a), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call syr
+template< typename VectorX, typename MatrixA >
+inline integer_t syr( char const uplo,
+ typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ syr_impl< value_type >::compute( uplo, alpha, x, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/syr2.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/syr2.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SYR2_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SYR2_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void syr2( char const uplo, integer_t const n, float const alpha,
+ float* x, integer_t const incx, float* y, integer_t const incy,
+ float* a, integer_t const lda ) {
+ BLAS_SSYR2( &uplo, &n, &alpha, x, &incx, y, &incy, a, &lda );
+ }
+ inline void syr2( char const uplo, integer_t const n, double const alpha,
+ double* x, integer_t const incx, double* y, integer_t const incy,
+ double* a, integer_t const lda ) {
+ BLAS_DSYR2( &uplo, &n, &alpha, x, &incx, y, &incy, a, &lda );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syr2_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename MatrixA >
+ static return_type compute( char const uplo, real_type const alpha,
+ VectorX& x, VectorY& y, MatrixA& a ) {
+ detail::syr2( uplo, traits::matrix_size2(a), alpha,
+ traits::vector_storage(x), traits::vector_stride(x),
+ traits::vector_storage(y), traits::vector_stride(y),
+ traits::matrix_storage(a), traits::leading_dimension(a) );
+ }
+};
+
+// template function to call syr2
+template< typename VectorX, typename VectorY, typename MatrixA >
+inline integer_t syr2( char const uplo,
+ typename traits::vector_traits< VectorX >::value_type const alpha,
+ VectorX& x, VectorY& y, MatrixA& a ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ syr2_impl< value_type >::compute( uplo, alpha, x, y, a );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tbmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tbmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TBMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TBMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void tbmv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* x, integer_t const incx ) {
+ BLAS_STBMV( &uplo, &trans, &diag, &n, &k, a, &lda, x, &incx );
+ }
+ inline void tbmv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, double* a,
+ integer_t const lda, double* x, integer_t const incx ) {
+ BLAS_DTBMV( &uplo, &trans, &diag, &n, &k, a, &lda, x, &incx );
+ }
+ inline void tbmv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, integer_t const incx ) {
+ BLAS_CTBMV( &uplo, &trans, &diag, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(x), &incx );
+ }
+ inline void tbmv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, integer_t const incx ) {
+ BLAS_ZTBMV( &uplo, &trans, &diag, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct tbmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX >
+ static return_type compute( char const uplo, char const trans,
+ char const diag, integer_t const k, MatrixA& a, VectorX& x ) {
+ detail::tbmv( uplo, trans, diag, traits::matrix_size2(a), k,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call tbmv
+template< typename MatrixA, typename VectorX >
+inline integer_t tbmv( char const uplo, char const trans,
+ char const diag, integer_t const k, MatrixA& a, VectorX& x ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ tbmv_impl< value_type >::compute( uplo, trans, diag, k, a, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tbsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tbsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TBSV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TBSV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void tbsv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* x, integer_t const incx ) {
+ BLAS_STBSV( &uplo, &trans, &diag, &n, &k, a, &lda, x, &incx );
+ }
+ inline void tbsv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, double* a,
+ integer_t const lda, double* x, integer_t const incx ) {
+ BLAS_DTBSV( &uplo, &trans, &diag, &n, &k, a, &lda, x, &incx );
+ }
+ inline void tbsv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, integer_t const incx ) {
+ BLAS_CTBSV( &uplo, &trans, &diag, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(x), &incx );
+ }
+ inline void tbsv( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const k, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, integer_t const incx ) {
+ BLAS_ZTBSV( &uplo, &trans, &diag, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct tbsv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX >
+ static return_type compute( char const uplo, char const trans,
+ char const diag, integer_t const k, MatrixA& a, VectorX& x ) {
+ detail::tbsv( uplo, trans, diag, traits::matrix_size2(a), k,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call tbsv
+template< typename MatrixA, typename VectorX >
+inline integer_t tbsv( char const uplo, char const trans,
+ char const diag, integer_t const k, MatrixA& a, VectorX& x ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ tbsv_impl< value_type >::compute( uplo, trans, diag, k, a, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tpmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tpmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TPMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TPMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void tpmv( char const uplo, char const trans, char const diag,
+ integer_t const n, float* ap, float* x, integer_t const incx ) {
+ BLAS_STPMV( &uplo, &trans, &diag, &n, ap, x, &incx );
+ }
+ inline void tpmv( char const uplo, char const trans, char const diag,
+ integer_t const n, double* ap, double* x, integer_t const incx ) {
+ BLAS_DTPMV( &uplo, &trans, &diag, &n, ap, x, &incx );
+ }
+ inline void tpmv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_f* ap, traits::complex_f* x,
+ integer_t const incx ) {
+ BLAS_CTPMV( &uplo, &trans, &diag, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(x), &incx );
+ }
+ inline void tpmv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_d* ap, traits::complex_d* x,
+ integer_t const incx ) {
+ BLAS_ZTPMV( &uplo, &trans, &diag, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct tpmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorX >
+ static return_type compute( char const uplo, char const trans,
+ char const diag, MatrixAP& ap, VectorX& x ) {
+ detail::tpmv( uplo, trans, diag, traits::matrix_size2(ap),
+ traits::matrix_storage(ap), traits::vector_storage(x),
+ traits::vector_stride(x) );
+ }
+};
+
+// template function to call tpmv
+template< typename MatrixAP, typename VectorX >
+inline integer_t tpmv( char const uplo, char const trans,
+ char const diag, MatrixAP& ap, VectorX& x ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ tpmv_impl< value_type >::compute( uplo, trans, diag, ap, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tpsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/tpsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TPSV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TPSV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void tpsv( char const uplo, char const trans, char const diag,
+ integer_t const n, float* ap, float* x, integer_t const incx ) {
+ BLAS_STPSV( &uplo, &trans, &diag, &n, ap, x, &incx );
+ }
+ inline void tpsv( char const uplo, char const trans, char const diag,
+ integer_t const n, double* ap, double* x, integer_t const incx ) {
+ BLAS_DTPSV( &uplo, &trans, &diag, &n, ap, x, &incx );
+ }
+ inline void tpsv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_f* ap, traits::complex_f* x,
+ integer_t const incx ) {
+ BLAS_CTPSV( &uplo, &trans, &diag, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(x), &incx );
+ }
+ inline void tpsv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_d* ap, traits::complex_d* x,
+ integer_t const incx ) {
+ BLAS_ZTPSV( &uplo, &trans, &diag, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct tpsv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorX >
+ static return_type compute( char const uplo, char const trans,
+ char const diag, MatrixAP& ap, VectorX& x ) {
+ detail::tpsv( uplo, trans, diag, traits::matrix_size2(ap),
+ traits::matrix_storage(ap), traits::vector_storage(x),
+ traits::vector_stride(x) );
+ }
+};
+
+// template function to call tpsv
+template< typename MatrixAP, typename VectorX >
+inline integer_t tpsv( char const uplo, char const trans,
+ char const diag, MatrixAP& ap, VectorX& x ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ tpsv_impl< value_type >::compute( uplo, trans, diag, ap, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/trmv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/trmv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TRMV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TRMV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void trmv( char const uplo, char const trans, char const diag,
+ integer_t const n, float* a, integer_t const lda, float* x,
+ integer_t const incx ) {
+ BLAS_STRMV( &uplo, &trans, &diag, &n, a, &lda, x, &incx );
+ }
+ inline void trmv( char const uplo, char const trans, char const diag,
+ integer_t const n, double* a, integer_t const lda, double* x,
+ integer_t const incx ) {
+ BLAS_DTRMV( &uplo, &trans, &diag, &n, a, &lda, x, &incx );
+ }
+ inline void trmv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* x, integer_t const incx ) {
+ BLAS_CTRMV( &uplo, &trans, &diag, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(x), &incx );
+ }
+ inline void trmv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* x, integer_t const incx ) {
+ BLAS_ZTRMV( &uplo, &trans, &diag, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trmv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX >
+ static return_type compute( char const uplo, char const trans,
+ char const diag, MatrixA& a, VectorX& x ) {
+ detail::trmv( uplo, trans, diag, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call trmv
+template< typename MatrixA, typename VectorX >
+inline integer_t trmv( char const uplo, char const trans,
+ char const diag, MatrixA& a, VectorX& x ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ trmv_impl< value_type >::compute( uplo, trans, diag, a, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/trsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level2/trsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TRSV_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TRSV_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void trsv( char const uplo, char const trans, char const diag,
+ integer_t const n, float* a, integer_t const lda, float* x,
+ integer_t const incx ) {
+ BLAS_STRSV( &uplo, &trans, &diag, &n, a, &lda, x, &incx );
+ }
+ inline void trsv( char const uplo, char const trans, char const diag,
+ integer_t const n, double* a, integer_t const lda, double* x,
+ integer_t const incx ) {
+ BLAS_DTRSV( &uplo, &trans, &diag, &n, a, &lda, x, &incx );
+ }
+ inline void trsv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* x, integer_t const incx ) {
+ BLAS_CTRSV( &uplo, &trans, &diag, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(x), &incx );
+ }
+ inline void trsv( char const uplo, char const trans, char const diag,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* x, integer_t const incx ) {
+ BLAS_ZTRSV( &uplo, &trans, &diag, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trsv_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX >
+ static return_type compute( char const uplo, char const trans,
+ char const diag, MatrixA& a, VectorX& x ) {
+ detail::trsv( uplo, trans, diag, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), traits::vector_stride(x) );
+ }
+};
+
+// template function to call trsv
+template< typename MatrixA, typename VectorX >
+inline integer_t trsv( char const uplo, char const trans,
+ char const diag, MatrixA& a, VectorX& x ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ trsv_impl< value_type >::compute( uplo, trans, diag, a, x );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/gemm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/gemm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_GEMM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_GEMM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void gemm( char const transa, char const transb, integer_t const m,
+ integer_t const n, integer_t const k, float const alpha, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ float const beta, float* c, integer_t const ldc ) {
+ BLAS_SGEMM( &transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb,
+ &beta, c, &ldc );
+ }
+ inline void gemm( char const transa, char const transb, integer_t const m,
+ integer_t const n, integer_t const k, double const alpha,
+ double* a, integer_t const lda, double* b, integer_t const ldb,
+ double const beta, double* c, integer_t const ldc ) {
+ BLAS_DGEMM( &transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb,
+ &beta, c, &ldc );
+ }
+ inline void gemm( char const transa, char const transb, integer_t const m,
+ integer_t const n, integer_t const k,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f const beta, traits::complex_f* c,
+ integer_t const ldc ) {
+ BLAS_CGEMM( &transa, &transb, &m, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+ inline void gemm( char const transa, char const transb, integer_t const m,
+ integer_t const n, integer_t const k,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d const beta, traits::complex_d* c,
+ integer_t const ldc ) {
+ BLAS_ZGEMM( &transa, &transb, &m, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gemm_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static return_type compute( char const transa, char const transb,
+ integer_t const m, integer_t const k,
+ traits::complex_d const alpha, MatrixA& a, MatrixB& b,
+ traits::complex_d const beta, MatrixC& c ) {
+ detail::gemm( transa, transb, m, traits::matrix_size2(c), k,
+ alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
+ }
+};
+
+// template function to call gemm
+template< typename MatrixA, typename MatrixB, typename MatrixC >
+inline integer_t gemm( char const transa, char const transb,
+ integer_t const m, integer_t const k, traits::complex_d const alpha,
+ MatrixA& a, MatrixB& b, traits::complex_d const beta, MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ gemm_impl< value_type >::compute( transa, transb, m, k, alpha, a, b,
+ beta, c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/hemm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/hemm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HEMM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HEMM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void hemm( char const side, char const uplo, integer_t const m,
+ integer_t const n, traits::complex_f const alpha,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f const beta,
+ traits::complex_f* c, integer_t const ldc ) {
+ BLAS_CHEMM( &side, &uplo, &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+ inline void hemm( char const side, char const uplo, integer_t const m,
+ integer_t const n, traits::complex_d const alpha,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d const beta,
+ traits::complex_d* c, integer_t const ldc ) {
+ BLAS_ZHEMM( &side, &uplo, &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hemm_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static return_type compute( char const side, char const uplo,
+ traits::complex_d const alpha, MatrixA& a, MatrixB& b,
+ traits::complex_d const beta, MatrixC& c ) {
+ detail::hemm( side, uplo, traits::matrix_size1(c),
+ traits::matrix_size2(c), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
+ }
+};
+
+// template function to call hemm
+template< typename MatrixA, typename MatrixB, typename MatrixC >
+inline integer_t hemm( char const side, char const uplo,
+ traits::complex_d const alpha, MatrixA& a, MatrixB& b,
+ traits::complex_d const beta, MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ hemm_impl< value_type >::compute( side, uplo, alpha, a, b, beta, c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/her2k.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,85 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HER2K_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HER2K_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void her2k( char const uplo, char const trans, integer_t const n,
+ integer_t const k, traits::complex_f const alpha,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, float const beta, traits::complex_f* c,
+ integer_t const ldc ) {
+ BLAS_CHER2K( &uplo, &trans, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &beta, traits::complex_ptr(c), &ldc );
+ }
+ inline void her2k( char const uplo, char const trans, integer_t const n,
+ integer_t const k, traits::complex_d const alpha,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, double const beta, traits::complex_d* c,
+ integer_t const ldc ) {
+ BLAS_ZHER2K( &uplo, &trans, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &beta, traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct her2k_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static return_type compute( char const uplo, char const trans,
+ integer_t const k, traits::complex_d const alpha, MatrixA& a,
+ MatrixB& b, real_type const beta, MatrixC& c ) {
+ detail::her2k( uplo, trans, traits::matrix_size2(c), k, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), beta,
+ traits::matrix_storage(c), traits::leading_dimension(c) );
+ }
+};
+
+// template function to call her2k
+template< typename MatrixA, typename MatrixB, typename MatrixC >
+inline integer_t her2k( char const uplo, char const trans,
+ integer_t const k, traits::complex_d const alpha, MatrixA& a,
+ MatrixB& b,
+ typename traits::matrix_traits< MatrixA >::value_type const beta,
+ MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ her2k_impl< value_type >::compute( uplo, trans, k, alpha, a, b, beta,
+ c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/herk.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_HERK_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_HERK_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void herk( char const uplo, char const trans, integer_t const n,
+ integer_t const k, float const alpha, traits::complex_f* a,
+ integer_t const lda, float const beta, traits::complex_f* c,
+ integer_t const ldc ) {
+ BLAS_CHERK( &uplo, &trans, &n, &k, &alpha, traits::complex_ptr(a),
+ &lda, &beta, traits::complex_ptr(c), &ldc );
+ }
+ inline void herk( char const uplo, char const trans, integer_t const n,
+ integer_t const k, double const alpha, traits::complex_d* a,
+ integer_t const lda, double const beta, traits::complex_d* c,
+ integer_t const ldc ) {
+ BLAS_ZHERK( &uplo, &trans, &n, &k, &alpha, traits::complex_ptr(a),
+ &lda, &beta, traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct herk_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixC >
+ static return_type compute( char const uplo, char const trans,
+ integer_t const k, real_type const alpha, MatrixA& a,
+ real_type const beta, MatrixC& c ) {
+ detail::herk( uplo, trans, traits::matrix_size2(c), k, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a), beta,
+ traits::matrix_storage(c), traits::leading_dimension(c) );
+ }
+};
+
+// template function to call herk
+template< typename MatrixA, typename MatrixC >
+inline integer_t herk( char const uplo, char const trans,
+ integer_t const k,
+ typename traits::matrix_traits< MatrixA >::value_type const alpha,
+ MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const beta,
+ MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ herk_impl< value_type >::compute( uplo, trans, k, alpha, a, beta,
+ c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/symm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/symm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SYMM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SYMM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void symm( char const side, char const uplo, integer_t const m,
+ integer_t const n, float const alpha, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ float const beta, float* c, integer_t const ldc ) {
+ BLAS_SSYMM( &side, &uplo, &m, &n, &alpha, a, &lda, b, &ldb, &beta, c,
+ &ldc );
+ }
+ inline void symm( char const side, char const uplo, integer_t const m,
+ integer_t const n, double const alpha, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ double const beta, double* c, integer_t const ldc ) {
+ BLAS_DSYMM( &side, &uplo, &m, &n, &alpha, a, &lda, b, &ldb, &beta, c,
+ &ldc );
+ }
+ inline void symm( char const side, char const uplo, integer_t const m,
+ integer_t const n, traits::complex_f const alpha,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f const beta,
+ traits::complex_f* c, integer_t const ldc ) {
+ BLAS_CSYMM( &side, &uplo, &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+ inline void symm( char const side, char const uplo, integer_t const m,
+ integer_t const n, traits::complex_d const alpha,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d const beta,
+ traits::complex_d* c, integer_t const ldc ) {
+ BLAS_ZSYMM( &side, &uplo, &m, &n, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct symm_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static return_type compute( char const side, char const uplo,
+ traits::complex_d const alpha, MatrixA& a, MatrixB& b,
+ traits::complex_d const beta, MatrixC& c ) {
+ detail::symm( side, uplo, traits::matrix_size1(c),
+ traits::matrix_size2(c), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), beta, traits::matrix_storage(c),
+ traits::leading_dimension(c) );
+ }
+};
+
+// template function to call symm
+template< typename MatrixA, typename MatrixB, typename MatrixC >
+inline integer_t symm( char const side, char const uplo,
+ traits::complex_d const alpha, MatrixA& a, MatrixB& b,
+ traits::complex_d const beta, MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ symm_impl< value_type >::compute( side, uplo, alpha, a, b, beta, c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syr2k.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SYR2K_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SYR2K_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void syr2k( char const uplo, char const trans, integer_t const n,
+ integer_t const k, float const alpha, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ float const beta, float* c, integer_t const ldc ) {
+ BLAS_SSYR2K( &uplo, &trans, &n, &k, &alpha, a, &lda, b, &ldb, &beta,
+ c, &ldc );
+ }
+ inline void syr2k( char const uplo, char const trans, integer_t const n,
+ integer_t const k, double const alpha, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ double const beta, double* c, integer_t const ldc ) {
+ BLAS_DSYR2K( &uplo, &trans, &n, &k, &alpha, a, &lda, b, &ldb, &beta,
+ c, &ldc );
+ }
+ inline void syr2k( char const uplo, char const trans, integer_t const n,
+ integer_t const k, traits::complex_f const alpha,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f const beta,
+ traits::complex_f* c, integer_t const ldc ) {
+ BLAS_CSYR2K( &uplo, &trans, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+ inline void syr2k( char const uplo, char const trans, integer_t const n,
+ integer_t const k, traits::complex_d const alpha,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d const beta,
+ traits::complex_d* c, integer_t const ldc ) {
+ BLAS_ZSYR2K( &uplo, &trans, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(&beta), traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syr2k_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static return_type compute( char const uplo, char const trans,
+ integer_t const k, traits::complex_d const alpha, MatrixA& a,
+ MatrixB& b, traits::complex_d const beta, MatrixC& c ) {
+ detail::syr2k( uplo, trans, traits::matrix_size2(c), k, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), beta,
+ traits::matrix_storage(c), traits::leading_dimension(c) );
+ }
+};
+
+// template function to call syr2k
+template< typename MatrixA, typename MatrixB, typename MatrixC >
+inline integer_t syr2k( char const uplo, char const trans,
+ integer_t const k, traits::complex_d const alpha, MatrixA& a,
+ MatrixB& b, traits::complex_d const beta, MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ syr2k_impl< value_type >::compute( uplo, trans, k, alpha, a, b, beta,
+ c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/syrk.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SYRK_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SYRK_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void syrk( char const uplo, char const trans, integer_t const n,
+ integer_t const k, float const alpha, float* a,
+ integer_t const lda, float const beta, float* c,
+ integer_t const ldc ) {
+ BLAS_SSYRK( &uplo, &trans, &n, &k, &alpha, a, &lda, &beta, c, &ldc );
+ }
+ inline void syrk( char const uplo, char const trans, integer_t const n,
+ integer_t const k, double const alpha, double* a,
+ integer_t const lda, double const beta, double* c,
+ integer_t const ldc ) {
+ BLAS_DSYRK( &uplo, &trans, &n, &k, &alpha, a, &lda, &beta, c, &ldc );
+ }
+ inline void syrk( char const uplo, char const trans, integer_t const n,
+ integer_t const k, traits::complex_f const alpha,
+ traits::complex_f* a, integer_t const lda,
+ traits::complex_f const beta, traits::complex_f* c,
+ integer_t const ldc ) {
+ BLAS_CSYRK( &uplo, &trans, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(&beta),
+ traits::complex_ptr(c), &ldc );
+ }
+ inline void syrk( char const uplo, char const trans, integer_t const n,
+ integer_t const k, traits::complex_d const alpha,
+ traits::complex_d* a, integer_t const lda,
+ traits::complex_d const beta, traits::complex_d* c,
+ integer_t const ldc ) {
+ BLAS_ZSYRK( &uplo, &trans, &n, &k, traits::complex_ptr(&alpha),
+ traits::complex_ptr(a), &lda, traits::complex_ptr(&beta),
+ traits::complex_ptr(c), &ldc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syrk_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixC >
+ static return_type compute( char const uplo, char const trans,
+ integer_t const k, traits::complex_d const alpha, MatrixA& a,
+ traits::complex_d const beta, MatrixC& c ) {
+ detail::syrk( uplo, trans, traits::matrix_size2(c), k, alpha,
+ traits::matrix_storage(a), traits::leading_dimension(a), beta,
+ traits::matrix_storage(c), traits::leading_dimension(c) );
+ }
+};
+
+// template function to call syrk
+template< typename MatrixA, typename MatrixC >
+inline integer_t syrk( char const uplo, char const trans,
+ integer_t const k, traits::complex_d const alpha, MatrixA& a,
+ traits::complex_d const beta, MatrixC& c ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ syrk_impl< value_type >::compute( uplo, trans, k, alpha, a, beta,
+ c );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/trmm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/trmm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TRMM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TRMM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void trmm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ float const alpha, float* a, integer_t const lda, float* b,
+ integer_t const ldb ) {
+ BLAS_STRMM( &side, &uplo, &transa, &diag, &m, &n, &alpha, a, &lda, b,
+ &ldb );
+ }
+ inline void trmm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ double const alpha, double* a, integer_t const lda, double* b,
+ integer_t const ldb ) {
+ BLAS_DTRMM( &side, &uplo, &transa, &diag, &m, &n, &alpha, a, &lda, b,
+ &ldb );
+ }
+ inline void trmm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb ) {
+ BLAS_CTRMM( &side, &uplo, &transa, &diag, &m, &n,
+ traits::complex_ptr(&alpha), traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb );
+ }
+ inline void trmm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb ) {
+ BLAS_ZTRMM( &side, &uplo, &transa, &diag, &m, &n,
+ traits::complex_ptr(&alpha), traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trmm_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static return_type compute( char const side, char const uplo,
+ char const transa, char const diag, traits::complex_d const alpha,
+ MatrixA& a, MatrixB& b ) {
+ detail::trmm( side, uplo, transa, diag, traits::matrix_size1(b),
+ traits::matrix_size2(b), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b) );
+ }
+};
+
+// template function to call trmm
+template< typename MatrixA, typename MatrixB >
+inline integer_t trmm( char const side, char const uplo,
+ char const transa, char const diag, traits::complex_d const alpha,
+ MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ trmm_impl< value_type >::compute( side, uplo, transa, diag, alpha,
+ a, b );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/trsm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/level3/trsm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_TRSM_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_TRSM_HPP
+
+#include <boost/numeric/bindings/blas/blas.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//$DESCRIPTION
+
+// overloaded functions to call blas
+namespace detail {
+ inline void trsm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ float const alpha, float* a, integer_t const lda, float* b,
+ integer_t const ldb ) {
+ BLAS_STRSM( &side, &uplo, &transa, &diag, &m, &n, &alpha, a, &lda, b,
+ &ldb );
+ }
+ inline void trsm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ double const alpha, double* a, integer_t const lda, double* b,
+ integer_t const ldb ) {
+ BLAS_DTRSM( &side, &uplo, &transa, &diag, &m, &n, &alpha, a, &lda, b,
+ &ldb );
+ }
+ inline void trsm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ traits::complex_f const alpha, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb ) {
+ BLAS_CTRSM( &side, &uplo, &transa, &diag, &m, &n,
+ traits::complex_ptr(&alpha), traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb );
+ }
+ inline void trsm( char const side, char const uplo, char const transa,
+ char const diag, integer_t const m, integer_t const n,
+ traits::complex_d const alpha, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb ) {
+ BLAS_ZTRSM( &side, &uplo, &transa, &diag, &m, &n,
+ traits::complex_ptr(&alpha), traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trsm_impl {
+
+ typedef ValueType value_type;
+ typedef void return_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static return_type compute( char const side, char const uplo,
+ char const transa, char const diag, traits::complex_d const alpha,
+ MatrixA& a, MatrixB& b ) {
+ detail::trsm( side, uplo, transa, diag, traits::matrix_size1(b),
+ traits::matrix_size2(b), alpha, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b) );
+ }
+};
+
+// template function to call trsm
+template< typename MatrixA, typename MatrixB >
+inline integer_t trsm( char const side, char const uplo,
+ char const transa, char const diag, traits::complex_d const alpha,
+ MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ trsm_impl< value_type >::compute( side, uplo, transa, diag, alpha,
+ a, b );
+}
+
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/ilaenv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/ilaenv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright (c) Toon Knapen, Kresimir Fresl and Matthias Troyer 2003
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * KF acknowledges the support of the Faculty of Civil Engineering,
+ * University of Zagreb, Croatia.
+ *
+ */
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ILAENV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ILAENV_HPP
+
+#include <cstring>
+#include <boost/numeric/bindings/lapack/lapack.h>
+
+namespace boost { namespace numeric { namespace bindings { namespace lapack {
+
+ /*
+ * ilaenv() is called from the LAPACK routines to choose
+ * problem-dependent parameters such as the block sizes
+ * for the local environment.
+ */
+
+ inline
+ int ilaenv (int const ispec, const char* name, const char* opts,
+ int const n1 = -1, int const n2 = -1,
+ int const n3 = -1, int const n4 = -1)
+ {
+ return ::LAPACK_ILAENV (&ispec, name, opts, &n1, &n2, &n3, &n4,
+ std::strlen (name), std::strlen (opts));
+ }
+
+
+}}}}
+
+#endif
+

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsdc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsdc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_BDSDC_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_BDSDC_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void bdsdc( char const uplo, char const compq, integer_t const n,
+ float* d, float* e, float* u, integer_t const ldu, float* vt,
+ integer_t const ldvt, float* q, integer_t* iq, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SBDSDC( &uplo, &compq, &n, d, e, u, &ldu, vt, &ldvt, q, iq,
+ work, iwork, &info );
+ }
+ inline void bdsdc( char const uplo, char const compq, integer_t const n,
+ double* d, double* e, double* u, integer_t const ldu, double* vt,
+ integer_t const ldvt, double* q, integer_t* iq, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DBDSDC( &uplo, &compq, &n, d, e, u, &ldu, vt, &ldvt, q, iq,
+ work, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct bdsdc_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixU,
+ typename MatrixVT, typename VectorQ, typename VectorIQ,
+ typename WORK, typename IWORK >
+ static void compute( char const uplo, char const compq, integer_t const n,
+ VectorD& d, VectorE& e, MatrixU& u, MatrixVT& vt, VectorQ& q,
+ VectorIQ& iq, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( compq == 'N' || compq == 'P' || compq == 'I' );
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ compq, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::bdsdc( uplo, compq, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(vt),
+ traits::leading_dimension(vt), traits::vector_storage(q),
+ traits::vector_storage(iq),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixU,
+ typename MatrixVT, typename VectorQ, typename VectorIQ >
+ static void compute( char const uplo, char const compq, integer_t const n,
+ VectorD& d, VectorE& e, MatrixU& u, MatrixVT& vt, VectorQ& q,
+ VectorIQ& iq, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( compq,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( uplo, compq, n, d, e, u, vt, q, iq, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixU,
+ typename MatrixVT, typename VectorQ, typename VectorIQ >
+ static void compute( char const uplo, char const compq, integer_t const n,
+ VectorD& d, VectorE& e, MatrixU& u, MatrixVT& vt, VectorQ& q,
+ VectorIQ& iq, integer_t& info, optimal_workspace work ) {
+ compute( uplo, compq, n, d, e, u, vt, q, iq, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( char const compq, integer_t const n ) {
+ switch ( compq ) {
+ case 'N': return 4*n;
+ case 'P': return 6*n;
+ case 'I': return 3*n*n + 4*n;
+ }
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 8*n;
+ }
+};
+
+
+// template function to call bdsdc
+template< typename VectorD, typename VectorE, typename MatrixU,
+ typename MatrixVT, typename VectorQ, typename VectorIQ,
+ typename Workspace >
+inline integer_t bdsdc( char const uplo, char const compq,
+ integer_t const n, VectorD& d, VectorE& e, MatrixU& u, MatrixVT& vt,
+ VectorQ& q, VectorIQ& iq, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ bdsdc_impl< value_type >::compute( uplo, compq, n, d, e, u, vt, q,
+ iq, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,221 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_BDSQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_BDSQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void bdsqr( char const uplo, integer_t const n,
+ integer_t const ncvt, integer_t const nru, integer_t const ncc,
+ float* d, float* e, float* vt, integer_t const ldvt, float* u,
+ integer_t const ldu, float* c, integer_t const ldc, float* work,
+ integer_t& info ) {
+ LAPACK_SBDSQR( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu,
+ c, &ldc, work, &info );
+ }
+ inline void bdsqr( char const uplo, integer_t const n,
+ integer_t const ncvt, integer_t const nru, integer_t const ncc,
+ double* d, double* e, double* vt, integer_t const ldvt, double* u,
+ integer_t const ldu, double* c, integer_t const ldc, double* work,
+ integer_t& info ) {
+ LAPACK_DBDSQR( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu,
+ c, &ldc, work, &info );
+ }
+ inline void bdsqr( char const uplo, integer_t const n,
+ integer_t const ncvt, integer_t const nru, integer_t const ncc,
+ float* d, float* e, traits::complex_f* vt, integer_t const ldvt,
+ traits::complex_f* u, integer_t const ldu, traits::complex_f* c,
+ integer_t const ldc, float* rwork, integer_t& info ) {
+ LAPACK_CBDSQR( &uplo, &n, &ncvt, &nru, &ncc, d, e,
+ traits::complex_ptr(vt), &ldvt, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(c), &ldc, rwork, &info );
+ }
+ inline void bdsqr( char const uplo, integer_t const n,
+ integer_t const ncvt, integer_t const nru, integer_t const ncc,
+ double* d, double* e, traits::complex_d* vt, integer_t const ldvt,
+ traits::complex_d* u, integer_t const ldu, traits::complex_d* c,
+ integer_t const ldc, double* rwork, integer_t& info ) {
+ LAPACK_ZBDSQR( &uplo, &n, &ncvt, &nru, &ncc, d, e,
+ traits::complex_ptr(vt), &ldvt, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(c), &ldc, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct bdsqr_impl{};
+
+// real specialization
+template< typename ValueType >
+struct bdsqr_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC, typename WORK >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(vt) >= 0 );
+ assert( traits::matrix_size1(u) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(u) >= std::max(1,
+ traits::matrix_size1(u)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n, traits::matrix_size2(vt), traits::matrix_size1(u),
+ traits::matrix_size2(c) )));
+#endif
+ detail::bdsqr( uplo, n, traits::matrix_size2(vt),
+ traits::matrix_size1(u), traits::matrix_size2(c),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n,
+ traits::matrix_size2(vt), traits::matrix_size1(u),
+ traits::matrix_size2(c) ) );
+ compute( uplo, n, d, e, vt, u, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, n, d, e, vt, u, c, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const ncvt,
+ integer_t const nru, integer_t const ncc ) {
+ if ( ncvt == 0 && nru == 0 && ncc == 0 )
+ return 2*n;
+ else
+ return std::max(1, 4*n);
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct bdsqr_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC, typename RWORK >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, integer_t& info,
+ detail::workspace1< RWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(vt) >= 0 );
+ assert( traits::matrix_size1(u) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(u) >= std::max(1,
+ traits::matrix_size1(u)) );
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n, traits::matrix_size2(vt),
+ traits::matrix_size1(u), traits::matrix_size2(c) )));
+#endif
+ detail::bdsqr( uplo, n, traits::matrix_size2(vt),
+ traits::matrix_size1(u), traits::matrix_size2(c),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n,
+ traits::matrix_size2(vt), traits::matrix_size1(u),
+ traits::matrix_size2(c) ) );
+ compute( uplo, n, d, e, vt, u, c, info, workspace( tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, n, d, e, vt, u, c, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_rwork( integer_t const n, integer_t const ncvt,
+ integer_t const nru, integer_t const ncc ) {
+ if ( ncvt == 0 && nru == 0 && ncc == 0 )
+ return 2*n;
+ else
+ return std::max(1, 4*n-4);
+ }
+};
+
+
+// template function to call bdsqr
+template< typename VectorD, typename VectorE, typename MatrixVT,
+ typename MatrixU, typename MatrixC, typename Workspace >
+inline integer_t bdsqr( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ bdsqr_impl< value_type >::compute( uplo, n, d, e, vt, u, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbbrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbbrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,238 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBBRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBBRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbbrd( char const vect, integer_t const m, integer_t const n,
+ integer_t const ncc, integer_t const kl, integer_t const ku,
+ float* ab, integer_t const ldab, float* d, float* e, float* q,
+ integer_t const ldq, float* pt, integer_t const ldpt, float* c,
+ integer_t const ldc, float* work, integer_t& info ) {
+ LAPACK_SGBBRD( &vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q,
+ &ldq, pt, &ldpt, c, &ldc, work, &info );
+ }
+ inline void gbbrd( char const vect, integer_t const m, integer_t const n,
+ integer_t const ncc, integer_t const kl, integer_t const ku,
+ double* ab, integer_t const ldab, double* d, double* e, double* q,
+ integer_t const ldq, double* pt, integer_t const ldpt, double* c,
+ integer_t const ldc, double* work, integer_t& info ) {
+ LAPACK_DGBBRD( &vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q,
+ &ldq, pt, &ldpt, c, &ldc, work, &info );
+ }
+ inline void gbbrd( char const vect, integer_t const m, integer_t const n,
+ integer_t const ncc, integer_t const kl, integer_t const ku,
+ traits::complex_f* ab, integer_t const ldab, float* d, float* e,
+ traits::complex_f* q, integer_t const ldq, traits::complex_f* pt,
+ integer_t const ldpt, traits::complex_f* c, integer_t const ldc,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CGBBRD( &vect, &m, &n, &ncc, &kl, &ku, traits::complex_ptr(ab),
+ &ldab, d, e, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(pt), &ldpt, traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gbbrd( char const vect, integer_t const m, integer_t const n,
+ integer_t const ncc, integer_t const kl, integer_t const ku,
+ traits::complex_d* ab, integer_t const ldab, double* d, double* e,
+ traits::complex_d* q, integer_t const ldq, traits::complex_d* pt,
+ integer_t const ldpt, traits::complex_d* c, integer_t const ldc,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGBBRD( &vect, &m, &n, &ncc, &kl, &ku, traits::complex_ptr(ab),
+ &ldab, d, e, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(pt), &ldpt, traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gbbrd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gbbrd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC,
+ typename WORK >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'N' || vect == 'Q' || vect == 'P' || vect == 'B' );
+ assert( m >= 0 );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+ assert( traits::vector_size(d) >= std::min(m,n) );
+ assert( traits::vector_size(e) >= std::min(m,n)-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ m, n )));
+#endif
+ detail::gbbrd( vect, m, n, traits::matrix_size2(c), kl, ku,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(pt), traits::leading_dimension(pt),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( m, n ) );
+ compute( vect, m, n, kl, ku, ab, d, e, q, pt, c, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, integer_t& info, optimal_workspace work ) {
+ compute( vect, m, n, kl, ku, ab, d, e, q, pt, c, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ return 2*std::max(m,n);
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gbbrd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC,
+ typename WORK, typename RWORK >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'N' || vect == 'Q' || vect == 'P' || vect == 'B' );
+ assert( m >= 0 );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+ assert( traits::vector_size(d) >= std::min(m,n) );
+ assert( traits::vector_size(e) >= std::min(m,n)-1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( m, n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( m, n )));
+#endif
+ detail::gbbrd( vect, m, n, traits::matrix_size2(c), kl, ku,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(pt), traits::leading_dimension(pt),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( m, n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( m, n ) );
+ compute( vect, m, n, kl, ku, ab, d, e, q, pt, c, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, integer_t& info, optimal_workspace work ) {
+ compute( vect, m, n, kl, ku, ab, d, e, q, pt, c, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ return std::max(m,n);
+ }
+
+ static integer_t min_size_rwork( integer_t const m, integer_t const n ) {
+ return std::max(m,n);
+ }
+};
+
+
+// template function to call gbbrd
+template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename MatrixPT, typename MatrixC,
+ typename Workspace >
+inline integer_t gbbrd( char const vect, integer_t const m,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q, MatrixPT& pt,
+ MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbbrd_impl< value_type >::compute( vect, m, n, kl, ku, ab, d, e, q,
+ pt, c, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,219 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBCON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBCON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbcon( char const norm, integer_t const n, integer_t const kl,
+ integer_t const ku, float* ab, integer_t const ldab,
+ integer_t* ipiv, float const anorm, float& rcond, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SGBCON( &norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, &rcond,
+ work, iwork, &info );
+ }
+ inline void gbcon( char const norm, integer_t const n, integer_t const kl,
+ integer_t const ku, double* ab, integer_t const ldab,
+ integer_t* ipiv, double const anorm, double& rcond, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DGBCON( &norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, &rcond,
+ work, iwork, &info );
+ }
+ inline void gbcon( char const norm, integer_t const n, integer_t const kl,
+ integer_t const ku, traits::complex_f* ab, integer_t const ldab,
+ integer_t* ipiv, float const anorm, float& rcond,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CGBCON( &norm, &n, &kl, &ku, traits::complex_ptr(ab), &ldab,
+ ipiv, &anorm, &rcond, traits::complex_ptr(work), rwork,
+ &info );
+ }
+ inline void gbcon( char const norm, integer_t const n, integer_t const kl,
+ integer_t const ku, traits::complex_d* ab, integer_t const ldab,
+ integer_t* ipiv, double const anorm, double& rcond,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGBCON( &norm, &n, &kl, &ku, traits::complex_ptr(ab), &ldab,
+ ipiv, &anorm, &rcond, traits::complex_ptr(work), rwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gbcon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gbcon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorIPIV, typename WORK,
+ typename IWORK >
+ static void compute( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, real_type const anorm, real_type& rcond,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::leading_dimension(ab) >= 2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::gbcon( norm, n, kl, ku, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::vector_storage(ipiv),
+ anorm, rcond,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorIPIV >
+ static void compute( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, real_type const anorm, real_type& rcond,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( norm, n, kl, ku, ab, ipiv, anorm, rcond, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorIPIV >
+ static void compute( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, real_type const anorm, real_type& rcond,
+ integer_t& info, optimal_workspace work ) {
+ compute( norm, n, kl, ku, ab, ipiv, anorm, rcond, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gbcon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorIPIV, typename WORK,
+ typename RWORK >
+ static void compute( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, real_type const anorm, real_type& rcond,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::leading_dimension(ab) >= 2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::gbcon( norm, n, kl, ku, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::vector_storage(ipiv),
+ anorm, rcond,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorIPIV >
+ static void compute( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, real_type const anorm, real_type& rcond,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( norm, n, kl, ku, ab, ipiv, anorm, rcond, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorIPIV >
+ static void compute( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, real_type const anorm, real_type& rcond,
+ integer_t& info, optimal_workspace work ) {
+ compute( norm, n, kl, ku, ab, ipiv, anorm, rcond, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call gbcon
+template< typename MatrixAB, typename VectorIPIV, typename Workspace >
+inline integer_t gbcon( char const norm, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv,
+ typename traits::matrix_traits< MatrixAB >::value_type const anorm,
+ typename traits::matrix_traits< MatrixAB >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbcon_impl< value_type >::compute( norm, n, kl, ku, ab, ipiv, anorm,
+ rcond, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbequ.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbequ.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,106 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBEQU_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBEQU_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbequ( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, float* ab,
+ integer_t const ldab, float* r, float* c, float& rowcnd,
+ float& colcnd, float& amax, integer_t& info ) {
+ LAPACK_SGBEQU( &m, &n, &kl, &ku, ab, &ldab, r, c, &rowcnd, &colcnd,
+ &amax, &info );
+ }
+ inline void gbequ( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, double* ab,
+ integer_t const ldab, double* r, double* c, double& rowcnd,
+ double& colcnd, double& amax, integer_t& info ) {
+ LAPACK_DGBEQU( &m, &n, &kl, &ku, ab, &ldab, r, c, &rowcnd, &colcnd,
+ &amax, &info );
+ }
+ inline void gbequ( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, traits::complex_f* ab,
+ integer_t const ldab, float* r, float* c, float& rowcnd,
+ float& colcnd, float& amax, integer_t& info ) {
+ LAPACK_CGBEQU( &m, &n, &kl, &ku, traits::complex_ptr(ab), &ldab, r, c,
+ &rowcnd, &colcnd, &amax, &info );
+ }
+ inline void gbequ( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, traits::complex_d* ab,
+ integer_t const ldab, double* r, double* c, double& rowcnd,
+ double& colcnd, double& amax, integer_t& info ) {
+ LAPACK_ZGBEQU( &m, &n, &kl, &ku, traits::complex_ptr(ab), &ldab, r, c,
+ &rowcnd, &colcnd, &amax, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gbequ_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename VectorR, typename VectorC >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab, VectorR& r,
+ VectorC& c, real_type& rowcnd, real_type& colcnd, real_type& amax,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+#endif
+ detail::gbequ( m, n, kl, ku, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::vector_storage(r),
+ traits::vector_storage(c), rowcnd, colcnd, amax, info );
+ }
+};
+
+
+// template function to call gbequ
+template< typename MatrixAB, typename VectorR, typename VectorC >
+inline integer_t gbequ( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab, VectorR& r,
+ VectorC& c,
+ typename traits::matrix_traits< MatrixAB >::value_type& rowcnd,
+ typename traits::matrix_traits< MatrixAB >::value_type& colcnd,
+ typename traits::matrix_traits< MatrixAB >::value_type& amax ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbequ_impl< value_type >::compute( m, n, kl, ku, ab, r, c, rowcnd,
+ colcnd, amax, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,265 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbrfs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ float* ab, integer_t const ldab, float* afb,
+ integer_t const ldafb, integer_t* ipiv, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SGBRFS( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb,
+ ipiv, b, &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void gbrfs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ double* ab, integer_t const ldab, double* afb,
+ integer_t const ldafb, integer_t* ipiv, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DGBRFS( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb,
+ ipiv, b, &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void gbrfs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ traits::complex_f* ab, integer_t const ldab,
+ traits::complex_f* afb, integer_t const ldafb, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CGBRFS( &trans, &n, &kl, &ku, &nrhs, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(afb), &ldafb, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gbrfs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ traits::complex_d* ab, integer_t const ldab,
+ traits::complex_d* afb, integer_t const ldafb, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGBRFS( &trans, &n, &kl, &ku, &nrhs, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(afb), &ldafb, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gbrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gbrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+ assert( traits::leading_dimension(afb) >= 2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::gbrfs( trans, n, kl, ku, traits::matrix_size2(x),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(afb), traits::leading_dimension(afb),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( trans, n, kl, ku, ab, afb, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( trans, n, kl, ku, ab, afb, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gbrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+ assert( traits::leading_dimension(afb) >= 2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::gbrfs( trans, n, kl, ku, traits::matrix_size2(x),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(afb), traits::leading_dimension(afb),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( trans, n, kl, ku, ab, afb, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( trans, n, kl, ku, ab, afb, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call gbrfs
+template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t gbrfs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab, MatrixAFB& afb,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbrfs_impl< value_type >::compute( trans, n, kl, ku, ab, afb, ipiv,
+ b, x, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBTRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBTRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbtrf( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, float* ab,
+ integer_t const ldab, integer_t* ipiv, integer_t& info ) {
+ LAPACK_SGBTRF( &m, &n, &kl, &ku, ab, &ldab, ipiv, &info );
+ }
+ inline void gbtrf( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, double* ab,
+ integer_t const ldab, integer_t* ipiv, integer_t& info ) {
+ LAPACK_DGBTRF( &m, &n, &kl, &ku, ab, &ldab, ipiv, &info );
+ }
+ inline void gbtrf( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, traits::complex_f* ab,
+ integer_t const ldab, integer_t* ipiv, integer_t& info ) {
+ LAPACK_CGBTRF( &m, &n, &kl, &ku, traits::complex_ptr(ab), &ldab, ipiv,
+ &info );
+ }
+ inline void gbtrf( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, traits::complex_d* ab,
+ integer_t const ldab, integer_t* ipiv, integer_t& info ) {
+ LAPACK_ZGBTRF( &m, &n, &kl, &ku, traits::complex_ptr(ab), &ldab, ipiv,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gbtrf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename VectorIPIV >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, integer_t& info ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::leading_dimension(ab) >= 2 );
+ assert( traits::vector_size(ipiv) >= std::min(m,n) );
+#endif
+ detail::gbtrf( m, n, kl, ku, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::vector_storage(ipiv),
+ info );
+ }
+};
+
+
+// template function to call gbtrf
+template< typename MatrixAB, typename VectorIPIV >
+inline integer_t gbtrf( integer_t const m, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbtrf_impl< value_type >::compute( m, n, kl, ku, ab, ipiv, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,106 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbtrs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ float* ab, integer_t const ldab, integer_t* ipiv, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SGBTRS( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb,
+ &info );
+ }
+ inline void gbtrs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ double* ab, integer_t const ldab, integer_t* ipiv, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DGBTRS( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb,
+ &info );
+ }
+ inline void gbtrs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ traits::complex_f* ab, integer_t const ldab, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CGBTRS( &trans, &n, &kl, &ku, &nrhs, traits::complex_ptr(ab),
+ &ldab, ipiv, traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void gbtrs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ traits::complex_d* ab, integer_t const ldab, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZGBTRS( &trans, &n, &kl, &ku, &nrhs, traits::complex_ptr(ab),
+ &ldab, ipiv, traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gbtrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename VectorIPIV, typename MatrixB >
+ static void compute( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(ab) >= 2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::gbtrs( trans, n, kl, ku, traits::matrix_size2(b),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call gbtrs
+template< typename MatrixAB, typename VectorIPIV, typename MatrixB >
+inline integer_t gbtrs( char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbtrs_impl< value_type >::compute( trans, n, kl, ku, ab, ipiv, b,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,105 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEBAK_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEBAK_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gebak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, float* scale,
+ integer_t const m, float* v, integer_t const ldv,
+ integer_t& info ) {
+ LAPACK_SGEBAK( &job, &side, &n, &ilo, &ihi, scale, &m, v, &ldv,
+ &info );
+ }
+ inline void gebak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, double* scale,
+ integer_t const m, double* v, integer_t const ldv,
+ integer_t& info ) {
+ LAPACK_DGEBAK( &job, &side, &n, &ilo, &ihi, scale, &m, v, &ldv,
+ &info );
+ }
+ inline void gebak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, float* scale,
+ integer_t const m, traits::complex_f* v, integer_t const ldv,
+ integer_t& info ) {
+ LAPACK_CGEBAK( &job, &side, &n, &ilo, &ihi, scale, &m,
+ traits::complex_ptr(v), &ldv, &info );
+ }
+ inline void gebak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, double* scale,
+ integer_t const m, traits::complex_d* v, integer_t const ldv,
+ integer_t& info ) {
+ LAPACK_ZGEBAK( &job, &side, &n, &ilo, &ihi, scale, &m,
+ traits::complex_ptr(v), &ldv, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gebak_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorSCALE, typename MatrixV >
+ static void compute( char const job, char const side, integer_t const ilo,
+ integer_t const ihi, VectorSCALE& scale, MatrixV& v,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( job == 'N' || job == 'P' || job == 'S' || job == 'B' );
+ assert( side == 'R' || side == 'L' );
+ assert( traits::matrix_size1(v) >= 0 );
+ assert( traits::vector_size(scale) >= traits::matrix_size1(v) );
+ assert( traits::matrix_size2(v) >= 0 );
+ assert( traits::leading_dimension(v) >= std::max(1,
+ traits::matrix_size1(v)) );
+#endif
+ detail::gebak( job, side, traits::matrix_size1(v), ilo, ihi,
+ traits::vector_storage(scale), traits::matrix_size2(v),
+ traits::matrix_storage(v), traits::leading_dimension(v),
+ info );
+ }
+};
+
+
+// template function to call gebak
+template< typename VectorSCALE, typename MatrixV >
+inline integer_t gebak( char const job, char const side,
+ integer_t const ilo, integer_t const ihi, VectorSCALE& scale,
+ MatrixV& v ) {
+ typedef typename traits::vector_traits< VectorSCALE >::value_type value_type;
+ integer_t info(0);
+ gebak_impl< value_type >::compute( job, side, ilo, ihi, scale, v,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebal.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebal.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,92 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEBAL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEBAL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gebal( char const job, integer_t const n, float* a,
+ integer_t const lda, integer_t& ilo, integer_t& ihi, float* scale,
+ integer_t& info ) {
+ LAPACK_SGEBAL( &job, &n, a, &lda, &ilo, &ihi, scale, &info );
+ }
+ inline void gebal( char const job, integer_t const n, double* a,
+ integer_t const lda, integer_t& ilo, integer_t& ihi,
+ double* scale, integer_t& info ) {
+ LAPACK_DGEBAL( &job, &n, a, &lda, &ilo, &ihi, scale, &info );
+ }
+ inline void gebal( char const job, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t& ilo,
+ integer_t& ihi, float* scale, integer_t& info ) {
+ LAPACK_CGEBAL( &job, &n, traits::complex_ptr(a), &lda, &ilo, &ihi,
+ scale, &info );
+ }
+ inline void gebal( char const job, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t& ilo,
+ integer_t& ihi, double* scale, integer_t& info ) {
+ LAPACK_ZGEBAL( &job, &n, traits::complex_ptr(a), &lda, &ilo, &ihi,
+ scale, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gebal_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorSCALE >
+ static void compute( char const job, MatrixA& a, integer_t& ilo,
+ integer_t& ihi, VectorSCALE& scale, integer_t& info ) {
+#ifndef NDEBUG
+ assert( job == 'N' || job == 'P' || job == 'S' || job == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::gebal( job, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), ilo,
+ ihi, traits::vector_storage(scale), info );
+ }
+};
+
+
+// template function to call gebal
+template< typename MatrixA, typename VectorSCALE >
+inline integer_t gebal( char const job, MatrixA& a, integer_t& ilo,
+ integer_t& ihi, VectorSCALE& scale ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gebal_impl< value_type >::compute( job, a, ilo, ihi, scale, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,221 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEBRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEBRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gebrd( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* d, float* e, float* tauq, float* taup,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEBRD( &m, &n, a, &lda, d, e, tauq, taup, work, &lwork,
+ &info );
+ }
+ inline void gebrd( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* d, double* e, double* tauq,
+ double* taup, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DGEBRD( &m, &n, a, &lda, d, e, tauq, taup, work, &lwork,
+ &info );
+ }
+ inline void gebrd( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float* d, float* e,
+ traits::complex_f* tauq, traits::complex_f* taup,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGEBRD( &m, &n, traits::complex_ptr(a), &lda, d, e,
+ traits::complex_ptr(tauq), traits::complex_ptr(taup),
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void gebrd( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double* d, double* e,
+ traits::complex_d* tauq, traits::complex_d* taup,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGEBRD( &m, &n, traits::complex_ptr(a), &lda, d, e,
+ traits::complex_ptr(tauq), traits::complex_ptr(taup),
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gebrd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gebrd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP, typename WORK >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(d) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(tauq) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(taup) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a) )));
+#endif
+ detail::gebrd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(tauq), traits::vector_storage(taup),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a) ) );
+ compute( a, d, e, tauq, taup, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gebrd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(tauq), traits::vector_storage(taup),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, d, e, tauq, taup, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ return std::max( 1, std::max( m, n ) );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gebrd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP, typename WORK >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(d) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(tauq) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(taup) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(a) )));
+#endif
+ detail::gebrd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(tauq), traits::vector_storage(taup),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a) ) );
+ compute( a, d, e, tauq, taup, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::gebrd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(tauq), traits::vector_storage(taup),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, d, e, tauq, taup, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ return std::max( 1, std::max( m, n ) );
+ }
+};
+
+
+// template function to call gebrd
+template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP, typename Workspace >
+inline integer_t gebrd( MatrixA& a, VectorD& d, VectorE& e,
+ VectorTAUQ& tauq, VectorTAUP& taup,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gebrd_impl< value_type >::compute( a, d, e, tauq, taup, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gecon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gecon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,199 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GECON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GECON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gecon( char const norm, integer_t const n, float* a,
+ integer_t const lda, float const anorm, float& rcond, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SGECON( &norm, &n, a, &lda, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void gecon( char const norm, integer_t const n, double* a,
+ integer_t const lda, double const anorm, double& rcond,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DGECON( &norm, &n, a, &lda, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void gecon( char const norm, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float const anorm,
+ float& rcond, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CGECON( &norm, &n, traits::complex_ptr(a), &lda, &anorm,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gecon( char const norm, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double const anorm,
+ double& rcond, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZGECON( &norm, &n, traits::complex_ptr(a), &lda, &anorm,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gecon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gecon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename WORK, typename IWORK >
+ static void compute( char const norm, MatrixA& a, real_type const anorm,
+ real_type& rcond, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::gecon( norm, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ anorm, rcond,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, MatrixA& a, real_type const anorm,
+ real_type& rcond, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( norm, a, anorm, rcond, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, MatrixA& a, real_type const anorm,
+ real_type& rcond, integer_t& info, optimal_workspace work ) {
+ compute( norm, a, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 4*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gecon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename WORK, typename RWORK >
+ static void compute( char const norm, MatrixA& a, real_type const anorm,
+ real_type& rcond, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::gecon( norm, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ anorm, rcond,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, MatrixA& a, real_type const anorm,
+ real_type& rcond, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( norm, a, anorm, rcond, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, MatrixA& a, real_type const anorm,
+ real_type& rcond, integer_t& info, optimal_workspace work ) {
+ compute( norm, a, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call gecon
+template< typename MatrixA, typename Workspace >
+inline integer_t gecon( char const norm, MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const anorm,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gecon_impl< value_type >::compute( norm, a, anorm, rcond, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geequ.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geequ.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEEQU_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEEQU_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geequ( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* r, float* c, float& rowcnd,
+ float& colcnd, float& amax, integer_t& info ) {
+ LAPACK_SGEEQU( &m, &n, a, &lda, r, c, &rowcnd, &colcnd, &amax, &info );
+ }
+ inline void geequ( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* r, double* c, double& rowcnd,
+ double& colcnd, double& amax, integer_t& info ) {
+ LAPACK_DGEEQU( &m, &n, a, &lda, r, c, &rowcnd, &colcnd, &amax, &info );
+ }
+ inline void geequ( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float* r, float* c,
+ float& rowcnd, float& colcnd, float& amax, integer_t& info ) {
+ LAPACK_CGEEQU( &m, &n, traits::complex_ptr(a), &lda, r, c, &rowcnd,
+ &colcnd, &amax, &info );
+ }
+ inline void geequ( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double* r, double* c,
+ double& rowcnd, double& colcnd, double& amax, integer_t& info ) {
+ LAPACK_ZGEEQU( &m, &n, traits::complex_ptr(a), &lda, r, c, &rowcnd,
+ &colcnd, &amax, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct geequ_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorR, typename VectorC >
+ static void compute( MatrixA& a, VectorR& r, VectorC& c,
+ real_type& rowcnd, real_type& colcnd, real_type& amax,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+#endif
+ detail::geequ( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(r), traits::vector_storage(c), rowcnd,
+ colcnd, amax, info );
+ }
+};
+
+
+// template function to call geequ
+template< typename MatrixA, typename VectorR, typename VectorC >
+inline integer_t geequ( MatrixA& a, VectorR& r, VectorC& c,
+ typename traits::matrix_traits< MatrixA >::value_type& rowcnd,
+ typename traits::matrix_traits< MatrixA >::value_type& colcnd,
+ typename traits::matrix_traits< MatrixA >::value_type& amax ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geequ_impl< value_type >::compute( a, r, c, rowcnd, colcnd, amax,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,191 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEHRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEHRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gehrd( integer_t const n, integer_t const ilo,
+ integer_t const ihi, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEHRD( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void gehrd( integer_t const n, integer_t const ilo,
+ integer_t const ihi, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DGEHRD( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void gehrd( integer_t const n, integer_t const ilo,
+ integer_t const ihi, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CGEHRD( &n, &ilo, &ihi, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void gehrd( integer_t const n, integer_t const ilo,
+ integer_t const ihi, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGEHRD( &n, &ilo, &ihi, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gehrd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gehrd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(tau) >= traits::matrix_size2(a)-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::gehrd( traits::matrix_size2(a), ilo, ihi,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gehrd( traits::matrix_size2(a), ilo, ihi,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gehrd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(tau) >= traits::matrix_size2(a)-1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::gehrd( traits::matrix_size2(a), ilo, ihi,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::gehrd( traits::matrix_size2(a), ilo, ihi,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call gehrd
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t gehrd( integer_t const ilo, integer_t const ihi,
+ MatrixA& a, VectorTAU& tau, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gehrd_impl< value_type >::compute( ilo, ihi, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gelqf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gelqf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,191 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GELQF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GELQF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gelqf( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGELQF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void gelqf( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGELQF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void gelqf( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGELQF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void gelqf( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGELQF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gelqf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gelqf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a) )));
+#endif
+ detail::gelqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a) ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gelqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return std::max( 1, m );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gelqf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a) )));
+#endif
+ detail::gelqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a) ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::gelqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call gelqf
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t gelqf( MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gelqf_impl< value_type >::compute( a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqlf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqlf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,191 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEQLF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEQLF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geqlf( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEQLF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void geqlf( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGEQLF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void geqlf( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGEQLF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void geqlf( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGEQLF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct geqlf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct geqlf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+#endif
+ detail::geqlf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::geqlf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct geqlf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+#endif
+ detail::geqlf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::geqlf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+
+// template function to call geqlf
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t geqlf( MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geqlf_impl< value_type >::compute( a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqp3.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqp3.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,209 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEQP3_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEQP3_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geqp3( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, integer_t* jpvt, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEQP3( &m, &n, a, &lda, jpvt, tau, work, &lwork, &info );
+ }
+ inline void geqp3( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, integer_t* jpvt, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGEQP3( &m, &n, a, &lda, jpvt, tau, work, &lwork, &info );
+ }
+ inline void geqp3( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* jpvt,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t& info ) {
+ LAPACK_CGEQP3( &m, &n, traits::complex_ptr(a), &lda, jpvt,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ rwork, &info );
+ }
+ inline void geqp3( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* jpvt,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t& info ) {
+ LAPACK_ZGEQP3( &m, &n, traits::complex_ptr(a), &lda, jpvt,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct geqp3_impl{};
+
+// real specialization
+template< typename ValueType >
+struct geqp3_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorJPVT, typename VectorTAU,
+ typename WORK >
+ static void compute( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::geqp3( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(jpvt), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorJPVT, typename VectorTAU >
+ static void compute( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, jpvt, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorJPVT, typename VectorTAU >
+ static void compute( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::geqp3( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(jpvt), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, jpvt, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct geqp3_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorJPVT, typename VectorTAU,
+ typename WORK, typename RWORK >
+ static void compute( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::geqp3( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(jpvt), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorJPVT, typename VectorTAU >
+ static void compute( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( a, jpvt, tau, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorJPVT, typename VectorTAU >
+ static void compute( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::geqp3( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(jpvt), traits::vector_storage(tau),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, jpvt, tau, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call geqp3
+template< typename MatrixA, typename VectorJPVT, typename VectorTAU,
+ typename Workspace >
+inline integer_t geqp3( MatrixA& a, VectorJPVT& jpvt, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geqp3_impl< value_type >::compute( a, jpvt, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/geqrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,191 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEQRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEQRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geqrf( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEQRF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void geqrf( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGEQRF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void geqrf( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGEQRF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void geqrf( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGEQRF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct geqrf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct geqrf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::geqrf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::geqrf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct geqrf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::geqrf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::geqrf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call geqrf
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t geqrf( MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geqrf_impl< value_type >::compute( a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,258 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GERFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GERFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gerfs( char const trans, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* af,
+ integer_t const ldaf, integer_t* ipiv, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SGERFS( &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void gerfs( char const trans, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* af,
+ integer_t const ldaf, integer_t* ipiv, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DGERFS( &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void gerfs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CGERFS( &trans, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gerfs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGERFS( &trans, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gerfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gerfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::gerfs( trans, traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( trans, a, af, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( trans, a, af, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gerfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::gerfs( trans, traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( trans, a, af, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( trans, a, af, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call gerfs
+template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t gerfs( char const trans, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gerfs_impl< value_type >::compute( trans, a, af, ipiv, b, x, ferr,
+ berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,191 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GERQF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GERQF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gerqf( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGERQF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void gerqf( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGERQF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void gerqf( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGERQF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void gerqf( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGERQF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gerqf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gerqf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::gerqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gerqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gerqf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::gerqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::gerqf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call gerqf
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t gerqf( MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gerqf_impl< value_type >::compute( a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,88 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GETRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GETRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void getrf( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, integer_t* ipiv, integer_t& info ) {
+ LAPACK_SGETRF( &m, &n, a, &lda, ipiv, &info );
+ }
+ inline void getrf( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, integer_t* ipiv, integer_t& info ) {
+ LAPACK_DGETRF( &m, &n, a, &lda, ipiv, &info );
+ }
+ inline void getrf( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ integer_t& info ) {
+ LAPACK_CGETRF( &m, &n, traits::complex_ptr(a), &lda, ipiv, &info );
+ }
+ inline void getrf( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ integer_t& info ) {
+ LAPACK_ZGETRF( &m, &n, traits::complex_ptr(a), &lda, ipiv, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct getrf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(ipiv) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+#endif
+ detail::getrf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), info );
+ }
+};
+
+
+// template function to call getrf
+template< typename MatrixA, typename VectorIPIV >
+inline integer_t getrf( MatrixA& a, VectorIPIV& ipiv ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ getrf_impl< value_type >::compute( a, ipiv, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getri.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getri.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,183 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GETRI_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GETRI_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void getri( integer_t const n, float* a, integer_t const lda,
+ integer_t* ipiv, float* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_SGETRI( &n, a, &lda, ipiv, work, &lwork, &info );
+ }
+ inline void getri( integer_t const n, double* a, integer_t const lda,
+ integer_t* ipiv, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DGETRI( &n, a, &lda, ipiv, work, &lwork, &info );
+ }
+ inline void getri( integer_t const n, traits::complex_f* a,
+ integer_t const lda, integer_t* ipiv, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CGETRI( &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void getri( integer_t const n, traits::complex_d* a,
+ integer_t const lda, integer_t* ipiv, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGETRI( &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct getri_impl{};
+
+// real specialization
+template< typename ValueType >
+struct getri_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+#endif
+ detail::getri( traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::getri( traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct getri_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+#endif
+ detail::getri( traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::getri( traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+
+// template function to call getri
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t getri( MatrixA& a, VectorIPIV& ipiv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ getri_impl< value_type >::compute( a, ipiv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/getrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GETRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GETRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void getrs( char const trans, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda,
+ integer_t* ipiv, float* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_SGETRS( &trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ }
+ inline void getrs( char const trans, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda,
+ integer_t* ipiv, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DGETRS( &trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ }
+ inline void getrs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_f* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_CGETRS( &trans, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void getrs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_d* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_ZGETRS( &trans, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct getrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( char const trans, MatrixA& a, VectorIPIV& ipiv,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::getrs( trans, traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call getrs
+template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+inline integer_t getrs( char const trans, MatrixA& a, VectorIPIV& ipiv,
+ MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ getrs_impl< value_type >::compute( trans, a, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,107 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGBAK_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGBAK_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggbak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, float* lscale,
+ float* rscale, integer_t const m, float* v, integer_t const ldv,
+ integer_t& info ) {
+ LAPACK_SGGBAK( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v,
+ &ldv, &info );
+ }
+ inline void ggbak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, double* lscale,
+ double* rscale, integer_t const m, double* v, integer_t const ldv,
+ integer_t& info ) {
+ LAPACK_DGGBAK( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v,
+ &ldv, &info );
+ }
+ inline void ggbak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, float* lscale,
+ float* rscale, integer_t const m, traits::complex_f* v,
+ integer_t const ldv, integer_t& info ) {
+ LAPACK_CGGBAK( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m,
+ traits::complex_ptr(v), &ldv, &info );
+ }
+ inline void ggbak( char const job, char const side, integer_t const n,
+ integer_t const ilo, integer_t const ihi, double* lscale,
+ double* rscale, integer_t const m, traits::complex_d* v,
+ integer_t const ldv, integer_t& info ) {
+ LAPACK_ZGGBAK( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m,
+ traits::complex_ptr(v), &ldv, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ggbak_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorLSCALE, typename VectorRSCALE, typename MatrixV >
+ static void compute( char const job, char const side, integer_t const ilo,
+ integer_t const ihi, VectorLSCALE& lscale, VectorRSCALE& rscale,
+ MatrixV& v, integer_t& info ) {
+#ifndef NDEBUG
+ assert( job == 'N' || job == 'P' || job == 'S' || job == 'B' );
+ assert( side == 'R' || side == 'L' );
+ assert( traits::matrix_size1(v) >= 0 );
+ assert( traits::vector_size(lscale) >= traits::matrix_size1(v) );
+ assert( traits::vector_size(rscale) >= traits::matrix_size1(v) );
+ assert( traits::matrix_size2(v) >= 0 );
+ assert( traits::leading_dimension(v) >= std::max(1,
+ traits::matrix_size1(v)) );
+#endif
+ detail::ggbak( job, side, traits::matrix_size1(v), ilo, ihi,
+ traits::vector_storage(lscale),
+ traits::vector_storage(rscale), traits::matrix_size2(v),
+ traits::matrix_storage(v), traits::leading_dimension(v),
+ info );
+ }
+};
+
+
+// template function to call ggbak
+template< typename VectorLSCALE, typename VectorRSCALE, typename MatrixV >
+inline integer_t ggbak( char const job, char const side,
+ integer_t const ilo, integer_t const ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, MatrixV& v ) {
+ typedef typename traits::vector_traits< VectorLSCALE >::value_type value_type;
+ integer_t info(0);
+ ggbak_impl< value_type >::compute( job, side, ilo, ihi, lscale,
+ rscale, v, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbal.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbal.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGBAL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGBAL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggbal( char const job, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ integer_t& ilo, integer_t& ihi, float* lscale, float* rscale,
+ float* work, integer_t& info ) {
+ LAPACK_SGGBAL( &job, &n, a, &lda, b, &ldb, &ilo, &ihi, lscale, rscale,
+ work, &info );
+ }
+ inline void ggbal( char const job, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ integer_t& ilo, integer_t& ihi, double* lscale, double* rscale,
+ double* work, integer_t& info ) {
+ LAPACK_DGGBAL( &job, &n, a, &lda, b, &ldb, &ilo, &ihi, lscale, rscale,
+ work, &info );
+ }
+ inline void ggbal( char const job, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, integer_t& ilo, integer_t& ihi,
+ float* lscale, float* rscale, float* work, integer_t& info ) {
+ LAPACK_CGGBAL( &job, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &ilo, &ihi, lscale, rscale,
+ work, &info );
+ }
+ inline void ggbal( char const job, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, integer_t& ilo, integer_t& ihi,
+ double* lscale, double* rscale, double* work, integer_t& info ) {
+ LAPACK_ZGGBAL( &job, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &ilo, &ihi, lscale, rscale,
+ work, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ggbal_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorLSCALE,
+ typename VectorRSCALE, typename WORK >
+ static void compute( char const job, integer_t const n, MatrixA& a,
+ MatrixB& b, integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'N' || job == 'P' || job == 'S' || job == 'B' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::ggbal( job, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), ilo, ihi,
+ traits::vector_storage(lscale),
+ traits::vector_storage(rscale),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorLSCALE,
+ typename VectorRSCALE >
+ static void compute( char const job, integer_t const n, MatrixA& a,
+ MatrixB& b, integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( job, n, a, b, ilo, ihi, lscale, rscale, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorLSCALE,
+ typename VectorRSCALE >
+ static void compute( char const job, integer_t const n, MatrixA& a,
+ MatrixB& b, integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, integer_t& info, optimal_workspace work ) {
+ compute( job, n, a, b, ilo, ihi, lscale, rscale, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call ggbal
+template< typename MatrixA, typename MatrixB, typename VectorLSCALE,
+ typename VectorRSCALE, typename Workspace >
+inline integer_t ggbal( char const job, integer_t const n, MatrixA& a,
+ MatrixB& b, integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggbal_impl< value_type >::compute( job, n, a, b, ilo, ihi, lscale,
+ rscale, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gghrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gghrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,113 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGHRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGHRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gghrd( char const compq, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, float* a,
+ integer_t const lda, float* b, integer_t const ldb, float* q,
+ integer_t const ldq, float* z, integer_t const ldz,
+ integer_t& info ) {
+ LAPACK_SGGHRD( &compq, &compz, &n, &ilo, &ihi, a, &lda, b, &ldb, q,
+ &ldq, z, &ldz, &info );
+ }
+ inline void gghrd( char const compq, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, double* a,
+ integer_t const lda, double* b, integer_t const ldb, double* q,
+ integer_t const ldq, double* z, integer_t const ldz,
+ integer_t& info ) {
+ LAPACK_DGGHRD( &compq, &compz, &n, &ilo, &ihi, a, &lda, b, &ldb, q,
+ &ldq, z, &ldz, &info );
+ }
+ inline void gghrd( char const compq, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* q, integer_t const ldq, traits::complex_f* z,
+ integer_t const ldz, integer_t& info ) {
+ LAPACK_CGGHRD( &compq, &compz, &n, &ilo, &ihi, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(q),
+ &ldq, traits::complex_ptr(z), &ldz, &info );
+ }
+ inline void gghrd( char const compq, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* q, integer_t const ldq, traits::complex_d* z,
+ integer_t const ldz, integer_t& info ) {
+ LAPACK_ZGGHRD( &compq, &compz, &n, &ilo, &ihi, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(q),
+ &ldq, traits::complex_ptr(z), &ldz, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gghrd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ >
+ static void compute( char const compq, char const compz,
+ integer_t const n, integer_t const ilo, MatrixA& a, MatrixB& b,
+ MatrixQ& q, MatrixZ& z, integer_t& info ) {
+#ifndef NDEBUG
+ assert( compq == 'N' || compq == 'I' || compq == 'V' );
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::gghrd( compq, compz, n, ilo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ info );
+ }
+};
+
+
+// template function to call gghrd
+template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ >
+inline integer_t gghrd( char const compq, char const compz,
+ integer_t const n, integer_t const ilo, MatrixA& a, MatrixB& b,
+ MatrixQ& q, MatrixZ& z ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gghrd_impl< value_type >::compute( compq, compz, n, ilo, a, b, q, z,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,228 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGQRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGQRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggqrf( integer_t const n, integer_t const m,
+ integer_t const p, float* a, integer_t const lda, float* taua,
+ float* b, integer_t const ldb, float* taub, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGGQRF( &n, &m, &p, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ }
+ inline void ggqrf( integer_t const n, integer_t const m,
+ integer_t const p, double* a, integer_t const lda, double* taua,
+ double* b, integer_t const ldb, double* taub, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGGQRF( &n, &m, &p, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ }
+ inline void ggqrf( integer_t const n, integer_t const m,
+ integer_t const p, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* taua, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* taub,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGGQRF( &n, &m, &p, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(taua), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(taub), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ggqrf( integer_t const n, integer_t const m,
+ integer_t const p, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* taua, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* taub,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGGQRF( &n, &m, &p, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(taua), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(taub), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggqrf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggqrf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB, typename WORK >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(taua) >= std::min(traits::matrix_size1(b),
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(taub) >= std::min(traits::matrix_size1(b),
+ traits::matrix_size2(b)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::ggqrf( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ggqrf( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggqrf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB, typename WORK >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(taua) >= std::min(traits::matrix_size1(b),
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(taub) >= std::min(traits::matrix_size1(b),
+ traits::matrix_size2(b)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::ggqrf( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ggqrf( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call ggqrf
+template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB, typename Workspace >
+inline integer_t ggqrf( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggqrf_impl< value_type >::compute( a, taua, b, taub, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,228 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGRQF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGRQF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggrqf( integer_t const m, integer_t const p,
+ integer_t const n, float* a, integer_t const lda, float* taua,
+ float* b, integer_t const ldb, float* taub, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGGRQF( &m, &p, &n, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ }
+ inline void ggrqf( integer_t const m, integer_t const p,
+ integer_t const n, double* a, integer_t const lda, double* taua,
+ double* b, integer_t const ldb, double* taub, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DGGRQF( &m, &p, &n, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ }
+ inline void ggrqf( integer_t const m, integer_t const p,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* taua, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* taub,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGGRQF( &m, &p, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(taua), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(taub), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ggrqf( integer_t const m, integer_t const p,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* taua, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* taub,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGGRQF( &m, &p, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(taua), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(taub), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggrqf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggrqf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB, typename WORK >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(taua) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(b)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(taub) >= std::min(traits::matrix_size1(b),
+ traits::matrix_size2(b)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::ggrqf( traits::matrix_size1(a), traits::matrix_size1(b),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ggrqf( traits::matrix_size1(a), traits::matrix_size1(b),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggrqf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB, typename WORK >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(taua) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(b)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(taub) >= std::min(traits::matrix_size1(b),
+ traits::matrix_size2(b)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::ggrqf( traits::matrix_size1(a), traits::matrix_size1(b),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB >
+ static void compute( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ggrqf( traits::matrix_size1(a), traits::matrix_size1(b),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(taua),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(taub), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, taua, b, taub, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call ggrqf
+template< typename MatrixA, typename VectorTAUA, typename MatrixB,
+ typename VectorTAUB, typename Workspace >
+inline integer_t ggrqf( MatrixA& a, VectorTAUA& taua, MatrixB& b,
+ VectorTAUB& taub, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggrqf_impl< value_type >::compute( a, taua, b, taub, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggsvp.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggsvp.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,305 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGSVP_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGSVP_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggsvp( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ float const tola, float const tolb, integer_t& k, integer_t& l,
+ float* u, integer_t const ldu, float* v, integer_t const ldv,
+ float* q, integer_t const ldq, integer_t* iwork, float* tau,
+ float* work, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void ggsvp( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ double* a, integer_t const lda, double* b, integer_t const ldb,
+ double const tola, double const tolb, integer_t& k, integer_t& l,
+ double* u, integer_t const ldu, double* v, integer_t const ldv,
+ double* q, integer_t const ldq, integer_t* iwork, double* tau,
+ double* work, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void ggsvp( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, float const tola, float const tolb,
+ integer_t& k, integer_t& l, traits::complex_f* u,
+ integer_t const ldu, traits::complex_f* v, integer_t const ldv,
+ traits::complex_f* q, integer_t const ldq, integer_t* iwork,
+ float* rwork, traits::complex_f* tau, traits::complex_f* work,
+ integer_t& info ) {
+ LAPACK_CGGSVP( &jobu, &jobv, &jobq, &m, &p, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &tola, &tolb, &k, &l, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(v), &ldv, traits::complex_ptr(q), &ldq,
+ iwork, rwork, traits::complex_ptr(tau),
+ traits::complex_ptr(work), &info );
+ }
+ inline void ggsvp( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, double const tola, double const tolb,
+ integer_t& k, integer_t& l, traits::complex_d* u,
+ integer_t const ldu, traits::complex_d* v, integer_t const ldv,
+ traits::complex_d* q, integer_t const ldq, integer_t* iwork,
+ double* rwork, traits::complex_d* tau, traits::complex_d* work,
+ integer_t& info ) {
+ LAPACK_ZGGSVP( &jobu, &jobv, &jobq, &m, &p, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &tola, &tolb, &k, &l, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(v), &ldv, traits::complex_ptr(q), &ldq,
+ iwork, rwork, traits::complex_ptr(tau),
+ traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggsvp_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggsvp_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ, typename IWORK, typename TAU,
+ typename WORK >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ MatrixA& a, MatrixB& b, real_type const tola,
+ real_type const tolb, integer_t& k, integer_t& l, MatrixU& u,
+ MatrixV& v, MatrixQ& q, integer_t& info,
+ detail::workspace3< IWORK, TAU, WORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'U' || jobu == 'N' );
+ assert( jobv == 'V' || jobv == 'N' );
+ assert( jobq == 'Q' || jobq == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_tau( traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(b), traits::matrix_size1(a),
+ traits::matrix_size1(b) )));
+#endif
+ detail::ggsvp( jobu, jobv, jobq, traits::matrix_size1(a),
+ traits::matrix_size1(b), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), tola,
+ tolb, k, l, traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(v),
+ traits::leading_dimension(v), traits::matrix_storage(q),
+ traits::leading_dimension(q),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ MatrixA& a, MatrixB& b, real_type const tola,
+ real_type const tolb, integer_t& k, integer_t& l, MatrixU& u,
+ MatrixV& v, MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(b) ) );
+ traits::detail::array< real_type > tmp_tau( min_size_tau( traits::matrix_size2(b) ) );
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(b), traits::matrix_size1(a),
+ traits::matrix_size1(b) ) );
+ compute( jobu, jobv, jobq, a, b, tola, tolb, k, l, u, v, q, info,
+ workspace( tmp_iwork, tmp_tau, tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ MatrixA& a, MatrixB& b, real_type const tola,
+ real_type const tolb, integer_t& k, integer_t& l, MatrixU& u,
+ MatrixV& v, MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( jobu, jobv, jobq, a, b, tola, tolb, k, l, u, v, q, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_tau( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const m,
+ integer_t const p ) {
+ return std::max(3*n,std::max(m,p));
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggsvp_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ, typename IWORK,
+ typename RWORK, typename TAU, typename WORK >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ MatrixA& a, MatrixB& b, real_type const tola,
+ real_type const tolb, integer_t& k, integer_t& l, MatrixU& u,
+ MatrixV& v, MatrixQ& q, integer_t& info,
+ detail::workspace4< IWORK, RWORK, TAU, WORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'U' || jobu == 'N' );
+ assert( jobv == 'V' || jobv == 'N' );
+ assert( jobq == 'Q' || jobq == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_tau( traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(b),
+ traits::matrix_size1(a), traits::matrix_size1(b) )));
+#endif
+ detail::ggsvp( jobu, jobv, jobq, traits::matrix_size1(a),
+ traits::matrix_size1(b), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), tola,
+ tolb, k, l, traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(v),
+ traits::leading_dimension(v), traits::matrix_storage(q),
+ traits::leading_dimension(q),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ MatrixA& a, MatrixB& b, real_type const tola,
+ real_type const tolb, integer_t& k, integer_t& l, MatrixU& u,
+ MatrixV& v, MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(b) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(b) ) );
+ traits::detail::array< value_type > tmp_tau( min_size_tau( traits::matrix_size2(b) ) );
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(b), traits::matrix_size1(a),
+ traits::matrix_size1(b) ) );
+ compute( jobu, jobv, jobq, a, b, tola, tolb, k, l, u, v, q, info,
+ workspace( tmp_iwork, tmp_rwork, tmp_tau, tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ MatrixA& a, MatrixB& b, real_type const tola,
+ real_type const tolb, integer_t& k, integer_t& l, MatrixU& u,
+ MatrixV& v, MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( jobu, jobv, jobq, a, b, tola, tolb, k, l, u, v, q, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_tau( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const m,
+ integer_t const p ) {
+ return std::max(3*n,std::max(m,p));
+ }
+};
+
+
+// template function to call ggsvp
+template< typename MatrixA, typename MatrixB, typename MatrixU,
+ typename MatrixV, typename MatrixQ, typename Workspace >
+inline integer_t ggsvp( char const jobu, char const jobv,
+ char const jobq, MatrixA& a, MatrixB& b,
+ typename traits::matrix_traits< MatrixA >::value_type const tola,
+ typename traits::matrix_traits< MatrixA >::value_type const tolb,
+ integer_t& k, integer_t& l, MatrixU& u, MatrixV& v, MatrixQ& q,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggsvp_impl< value_type >::compute( jobu, jobv, jobq, a, b, tola,
+ tolb, k, l, u, v, q, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,289 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GTRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GTRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gtrfs( char const trans, integer_t const n,
+ integer_t const nrhs, float* dl, float* d, float* du, float* dlf,
+ float* df, float* duf, float* du2, integer_t* ipiv, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SGTRFS( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
+ b, &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void gtrfs( char const trans, integer_t const n,
+ integer_t const nrhs, double* dl, double* d, double* du,
+ double* dlf, double* df, double* duf, double* du2,
+ integer_t* ipiv, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DGTRFS( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
+ b, &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void gtrfs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_f* dl, traits::complex_f* d,
+ traits::complex_f* du, traits::complex_f* dlf,
+ traits::complex_f* df, traits::complex_f* duf,
+ traits::complex_f* du2, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CGTRFS( &trans, &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(dlf), traits::complex_ptr(df),
+ traits::complex_ptr(duf), traits::complex_ptr(du2), ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gtrfs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_d* dl, traits::complex_d* d,
+ traits::complex_d* du, traits::complex_d* dlf,
+ traits::complex_d* df, traits::complex_d* duf,
+ traits::complex_d* du2, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZGTRFS( &trans, &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(dlf), traits::complex_ptr(df),
+ traits::complex_ptr(duf), traits::complex_ptr(du2), ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gtrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gtrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(dl) >= n-1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(du) >= n-1 );
+ assert( traits::vector_size(dlf) >= n-1 );
+ assert( traits::vector_size(df) >= n );
+ assert( traits::vector_size(duf) >= n-1 );
+ assert( traits::vector_size(du2) >= n-2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::gtrfs( trans, n, traits::matrix_size2(b),
+ traits::vector_storage(dl), traits::vector_storage(d),
+ traits::vector_storage(du), traits::vector_storage(dlf),
+ traits::vector_storage(df), traits::vector_storage(duf),
+ traits::vector_storage(du2), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
+ berr, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
+ berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gtrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(dl) >= n-1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(du) >= n-1 );
+ assert( traits::vector_size(dlf) >= n-1 );
+ assert( traits::vector_size(df) >= n );
+ assert( traits::vector_size(duf) >= n-1 );
+ assert( traits::vector_size(du2) >= n-2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::gtrfs( trans, n, traits::matrix_size2(b),
+ traits::vector_storage(dl), traits::vector_storage(d),
+ traits::vector_storage(du), traits::vector_storage(dlf),
+ traits::vector_storage(df), traits::vector_storage(duf),
+ traits::vector_storage(du2), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
+ berr, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
+ berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call gtrfs
+template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t gtrfs( char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf, VectorDF& df,
+ VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorDL >::value_type value_type;
+ integer_t info(0);
+ gtrfs_impl< value_type >::compute( trans, n, dl, d, du, dlf, df, duf,
+ du2, ipiv, b, x, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,112 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GTTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GTTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gttrs( char const trans, integer_t const n,
+ integer_t const nrhs, float* dl, float* d, float* du, float* du2,
+ integer_t* ipiv, float* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_SGTTRS( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b, &ldb,
+ &info );
+ }
+ inline void gttrs( char const trans, integer_t const n,
+ integer_t const nrhs, double* dl, double* d, double* du,
+ double* du2, integer_t* ipiv, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DGTTRS( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b, &ldb,
+ &info );
+ }
+ inline void gttrs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_f* dl, traits::complex_f* d,
+ traits::complex_f* du, traits::complex_f* du2, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CGTTRS( &trans, &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(du2), ipiv, traits::complex_ptr(b), &ldb,
+ &info );
+ }
+ inline void gttrs( char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_d* dl, traits::complex_d* d,
+ traits::complex_d* du, traits::complex_d* du2, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZGTTRS( &trans, &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(du2), ipiv, traits::complex_ptr(b), &ldb,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gttrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB >
+ static void compute( char const trans, integer_t const n, VectorDL& dl,
+ VectorD& d, VectorDU& du, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(dl) >= n-1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(du) >= n-1 );
+ assert( traits::vector_size(du2) >= n-2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::gttrs( trans, n, traits::matrix_size2(b),
+ traits::vector_storage(dl), traits::vector_storage(d),
+ traits::vector_storage(du), traits::vector_storage(du2),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call gttrs
+template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB >
+inline integer_t gttrs( char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDU2& du2,
+ VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::vector_traits< VectorDL >::value_type value_type;
+ integer_t info(0);
+ gttrs_impl< value_type >::compute( trans, n, dl, d, du, du2, ipiv, b,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hbgst.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hbgst.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,136 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBGST_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBGST_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbgst( char const vect, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, traits::complex_f* ab,
+ integer_t const ldab, traits::complex_f* bb, integer_t const ldbb,
+ traits::complex_f* x, integer_t const ldx,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CHBGST( &vect, &uplo, &n, &ka, &kb, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(bb), &ldbb, traits::complex_ptr(x),
+ &ldx, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void hbgst( char const vect, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, traits::complex_d* ab,
+ integer_t const ldab, traits::complex_d* bb, integer_t const ldbb,
+ traits::complex_d* x, integer_t const ldx,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZHBGST( &vect, &uplo, &n, &ka, &kb, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(bb), &ldbb, traits::complex_ptr(x),
+ &ldx, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbgst_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixX,
+ typename WORK, typename RWORK >
+ static void compute( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixX& x, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'N' || vect == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= kb );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hbgst( vect, traits::matrix_uplo_tag(a), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixX >
+ static void compute( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixX& x, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( vect, n, ka, kb, ab, bb, x, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixX >
+ static void compute( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixX& x, integer_t& info,
+ optimal_workspace work ) {
+ compute( vect, n, ka, kb, ab, bb, x, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hbgst
+template< typename MatrixAB, typename MatrixBB, typename MatrixX,
+ typename Workspace >
+inline integer_t hbgst( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab, MatrixBB& bb,
+ MatrixX& x, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbgst_impl< value_type >::compute( vect, n, ka, kb, ab, bb, x, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hbtrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hbtrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,123 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBTRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBTRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbtrd( char const vect, char const uplo, integer_t const n,
+ integer_t const kd, traits::complex_f* ab, integer_t const ldab,
+ float* d, float* e, traits::complex_f* q, integer_t const ldq,
+ traits::complex_f* work, integer_t& info ) {
+ LAPACK_CHBTRD( &vect, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
+ d, e, traits::complex_ptr(q), &ldq, traits::complex_ptr(work),
+ &info );
+ }
+ inline void hbtrd( char const vect, char const uplo, integer_t const n,
+ integer_t const kd, traits::complex_d* ab, integer_t const ldab,
+ double* d, double* e, traits::complex_d* q, integer_t const ldq,
+ traits::complex_d* work, integer_t& info ) {
+ LAPACK_ZHBTRD( &vect, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
+ d, e, traits::complex_ptr(q), &ldq, traits::complex_ptr(work),
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbtrd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename WORK >
+ static void compute( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
+ MatrixQ& q, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'N' || vect == 'V' || vect == 'U' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+#endif
+ detail::hbtrd( vect, traits::matrix_uplo_tag(a), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ >
+ static void compute( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
+ MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ compute( vect, n, kd, ab, d, e, q, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ >
+ static void compute( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
+ MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( vect, n, kd, ab, d, e, q, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hbtrd
+template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename Workspace >
+inline integer_t hbtrd( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbtrd_impl< value_type >::compute( vect, n, kd, ab, d, e, q, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hecon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hecon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HECON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HECON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hecon( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ float const anorm, float& rcond, traits::complex_f* work,
+ integer_t& info ) {
+ LAPACK_CHECON( &uplo, &n, traits::complex_ptr(a), &lda, ipiv, &anorm,
+ &rcond, traits::complex_ptr(work), &info );
+ }
+ inline void hecon( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ double const anorm, double& rcond, traits::complex_d* work,
+ integer_t& info ) {
+ LAPACK_ZHECON( &uplo, &n, traits::complex_ptr(a), &lda, ipiv, &anorm,
+ &rcond, traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hecon_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+#endif
+ detail::hecon( uplo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), anorm, rcond,
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( uplo, a, ipiv, anorm, rcond, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, a, ipiv, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call hecon
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t hecon( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ typename traits::matrix_traits< MatrixA >::value_type const anorm,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hecon_impl< value_type >::compute( uplo, a, ipiv, anorm, rcond, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hegst.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hegst.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,84 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEGST_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEGST_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hegst( integer_t const itype, char const uplo,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CHEGST( &itype, &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void hegst( integer_t const itype, char const uplo,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZHEGST( &itype, &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hegst_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( integer_t const itype, integer_t const n, MatrixA& a,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::hegst( itype, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call hegst
+template< typename MatrixA, typename MatrixB >
+inline integer_t hegst( integer_t const itype, integer_t const n,
+ MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hegst_impl< value_type >::compute( itype, n, a, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/herfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/herfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,154 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HERFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HERFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void herfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CHERFS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void herfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZHERFS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct herfs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::herfs( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( a, af, ipiv, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( a, af, ipiv, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call herfs
+template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t herfs( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ herfs_impl< value_type >::compute( a, af, ipiv, b, x, ferr, berr,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,128 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HETRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HETRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hetrd( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float* d, float* e,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CHETRD( &uplo, &n, traits::complex_ptr(a), &lda, d, e,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void hetrd( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double* d, double* e,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZHETRD( &uplo, &n, traits::complex_ptr(a), &lda, d, e,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hetrd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(d) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(tau) >= traits::matrix_size2(a)-1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( )));
+#endif
+ detail::hetrd( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( ) );
+ compute( a, d, e, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::hetrd( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(d),
+ traits::vector_storage(e), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, d, e, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( ) {
+ return 1;
+ }
+};
+
+
+// template function to call hetrd
+template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU, typename Workspace >
+inline integer_t hetrd( MatrixA& a, VectorD& d, VectorE& e,
+ VectorTAU& tau, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hetrd_impl< value_type >::compute( a, d, e, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,108 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HETRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HETRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hetrf( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CHETRF( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void hetrf( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZHETRF( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hetrf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( )));
+#endif
+ detail::hetrf( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ optimal_workspace work ) {
+ compute( a, ipiv, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( ) {
+ return 1;
+ }
+};
+
+
+// template function to call hetrf
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t hetrf( MatrixA& a, VectorIPIV& ipiv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hetrf_impl< value_type >::compute( a, ipiv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,108 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HETRI_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HETRI_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hetri( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_f* work, integer_t& info ) {
+ LAPACK_CHETRI( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &info );
+ }
+ inline void hetri( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_d* work, integer_t& info ) {
+ LAPACK_ZHETRI( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hetri_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+#endif
+ detail::hetri( uplo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( uplo, a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, optimal_workspace work ) {
+ compute( uplo, a, ipiv, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hetri
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t hetri( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hetri_impl< value_type >::compute( uplo, a, ipiv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HETRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HETRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hetrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_f* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_CHETRS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void hetrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_d* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_ZHETRS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hetrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::hetrs( uplo, traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call hetrs
+template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+inline integer_t hetrs( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hetrs_impl< value_type >::compute( uplo, a, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,288 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HGEQZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HGEQZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hgeqz( char const job, char const compq, char const compz,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ float* h, integer_t const ldh, float* t, integer_t const ldt,
+ float* alphar, float* alphai, float* beta, float* q,
+ integer_t const ldq, float* z, integer_t const ldz, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SHGEQZ( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh, t, &ldt,
+ alphar, alphai, beta, q, &ldq, z, &ldz, work, &lwork, &info );
+ }
+ inline void hgeqz( char const job, char const compq, char const compz,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ double* h, integer_t const ldh, double* t, integer_t const ldt,
+ double* alphar, double* alphai, double* beta, double* q,
+ integer_t const ldq, double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DHGEQZ( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh, t, &ldt,
+ alphar, alphai, beta, q, &ldq, z, &ldz, work, &lwork, &info );
+ }
+ inline void hgeqz( char const job, char const compq, char const compz,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ traits::complex_f* h, integer_t const ldh, traits::complex_f* t,
+ integer_t const ldt, traits::complex_f* alpha,
+ traits::complex_f* beta, traits::complex_f* q,
+ integer_t const ldq, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CHGEQZ( &job, &compq, &compz, &n, &ilo, &ihi,
+ traits::complex_ptr(h), &ldh, traits::complex_ptr(t), &ldt,
+ traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(q), &ldq, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void hgeqz( char const job, char const compq, char const compz,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ traits::complex_d* h, integer_t const ldh, traits::complex_d* t,
+ integer_t const ldt, traits::complex_d* alpha,
+ traits::complex_d* beta, traits::complex_d* q,
+ integer_t const ldq, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZHGEQZ( &job, &compq, &compz, &n, &ilo, &ihi,
+ traits::complex_ptr(h), &ldh, traits::complex_ptr(t), &ldt,
+ traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(q), &ldq, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct hgeqz_impl{};
+
+// real specialization
+template< typename ValueType >
+struct hgeqz_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixH, typename MatrixT, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ, typename WORK >
+ static void compute( char const job, char const compq, char const compz,
+ integer_t const ilo, MatrixH& h, MatrixT& t, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'S' );
+ assert( compq == 'N' || compq == 'I' || compq == 'V' );
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( traits::matrix_size2(h) >= 0 );
+ assert( traits::vector_size(alphar) >= traits::matrix_size2(h) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(h) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(h) )));
+#endif
+ detail::hgeqz( job, compq, compz, traits::matrix_size2(h), ilo,
+ traits::matrix_size2(h), traits::matrix_storage(h),
+ traits::leading_dimension(h), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixH, typename MatrixT, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ >
+ static void compute( char const job, char const compq, char const compz,
+ integer_t const ilo, MatrixH& h, MatrixT& t, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(h) ) );
+ compute( job, compq, compz, ilo, h, t, alphar, alphai, beta, q, z,
+ info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixH, typename MatrixT, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ >
+ static void compute( char const job, char const compq, char const compz,
+ integer_t const ilo, MatrixH& h, MatrixT& t, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::hgeqz( job, compq, compz, traits::matrix_size2(h), ilo,
+ traits::matrix_size2(h), traits::matrix_storage(h),
+ traits::leading_dimension(h), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( job, compq, compz, ilo, h, t, alphar, alphai, beta, q, z,
+ info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct hgeqz_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixH, typename MatrixT, typename VectorALPHA,
+ typename VectorBETA, typename MatrixQ, typename MatrixZ,
+ typename WORK, typename RWORK >
+ static void compute( char const job, char const compq, char const compz,
+ integer_t const ilo, MatrixH& h, MatrixT& t, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixQ& q, MatrixZ& z, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'S' );
+ assert( compq == 'N' || compq == 'I' || compq == 'V' );
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( traits::matrix_size2(h) >= 0 );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(h) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(h) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(h) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(h) )));
+#endif
+ detail::hgeqz( job, compq, compz, traits::matrix_size2(h), ilo,
+ traits::matrix_size2(h), traits::matrix_storage(h),
+ traits::leading_dimension(h), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::vector_storage(alpha),
+ traits::vector_storage(beta), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixH, typename MatrixT, typename VectorALPHA,
+ typename VectorBETA, typename MatrixQ, typename MatrixZ >
+ static void compute( char const job, char const compq, char const compz,
+ integer_t const ilo, MatrixH& h, MatrixT& t, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixQ& q, MatrixZ& z, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(h) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(h) ) );
+ compute( job, compq, compz, ilo, h, t, alpha, beta, q, z, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixH, typename MatrixT, typename VectorALPHA,
+ typename VectorBETA, typename MatrixQ, typename MatrixZ >
+ static void compute( char const job, char const compq, char const compz,
+ integer_t const ilo, MatrixH& h, MatrixT& t, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixQ& q, MatrixZ& z, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(h) ) );
+ detail::hgeqz( job, compq, compz, traits::matrix_size2(h), ilo,
+ traits::matrix_size2(h), traits::matrix_storage(h),
+ traits::leading_dimension(h), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::vector_storage(alpha),
+ traits::vector_storage(beta), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( job, compq, compz, ilo, h, t, alpha, beta, q, z, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hgeqz
+template< typename MatrixH, typename MatrixT, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ, typename Workspace >
+inline integer_t hgeqz( char const job, char const compq,
+ char const compz, integer_t const ilo, MatrixH& h, MatrixT& t,
+ VectorALPHAR& alphar, VectorALPHAI& alphai, VectorBETA& beta,
+ MatrixQ& q, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
+ integer_t info(0);
+ hgeqz_impl< value_type >::compute( job, compq, compz, ilo, h, t,
+ alphar, alphai, beta, q, z, info, work );
+ return info;
+}
+
+// template function to call hgeqz
+template< typename MatrixH, typename MatrixT, typename VectorALPHA,
+ typename VectorBETA, typename MatrixQ, typename MatrixZ,
+ typename Workspace >
+inline integer_t hgeqz( char const job, char const compq,
+ char const compz, integer_t const ilo, MatrixH& h, MatrixT& t,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
+ integer_t info(0);
+ hgeqz_impl< value_type >::compute( job, compq, compz, ilo, h, t,
+ alpha, beta, q, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hprfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hprfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,148 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* afp, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CHPRFS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void hprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* afp, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZHPRFS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hprfs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(afp) >= n*(n+1)/2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hprfs( traits::matrix_uplo_tag(a), n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(afp),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( n, ap, afp, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( n, ap, afp, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hprfs
+template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t hprfs( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hprfs_impl< value_type >::compute( n, ap, afp, ipiv, b, x, ferr,
+ berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hptrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hptrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,85 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CHPTRS( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void hptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZHPTRS( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hptrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+ static void compute( char const uplo, integer_t const n, MatrixAP& ap,
+ VectorIPIV& ipiv, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(ap) >= n*(n+1)/2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::hptrs( uplo, n, traits::matrix_size2(b),
+ traits::matrix_storage(ap), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call hptrs
+template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+inline integer_t hptrs( char const uplo, integer_t const n, MatrixAP& ap,
+ VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hptrs_impl< value_type >::compute( uplo, n, ap, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,277 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HSEIN_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HSEIN_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hsein( char const side, char const eigsrc, char const initv,
+ logical_t* select, integer_t const n, float* h,
+ integer_t const ldh, float* wr, float* wi, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, float* work, integer_t* ifaill,
+ integer_t* ifailr, integer_t& info ) {
+ LAPACK_SHSEIN( &side, &eigsrc, &initv, select, &n, h, &ldh, wr, wi,
+ vl, &ldvl, vr, &ldvr, &mm, &m, work, ifaill, ifailr, &info );
+ }
+ inline void hsein( char const side, char const eigsrc, char const initv,
+ logical_t* select, integer_t const n, double* h,
+ integer_t const ldh, double* wr, double* wi, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, double* work, integer_t* ifaill,
+ integer_t* ifailr, integer_t& info ) {
+ LAPACK_DHSEIN( &side, &eigsrc, &initv, select, &n, h, &ldh, wr, wi,
+ vl, &ldvl, vr, &ldvr, &mm, &m, work, ifaill, ifailr, &info );
+ }
+ inline void hsein( char const side, char const eigsrc, char const initv,
+ logical_t* select, integer_t const n, traits::complex_f* h,
+ integer_t const ldh, traits::complex_f* w, traits::complex_f* vl,
+ integer_t const ldvl, traits::complex_f* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, traits::complex_f* work,
+ float* rwork, integer_t* ifaill, integer_t* ifailr,
+ integer_t& info ) {
+ LAPACK_CHSEIN( &side, &eigsrc, &initv, select, &n,
+ traits::complex_ptr(h), &ldh, traits::complex_ptr(w),
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &mm, &m, traits::complex_ptr(work), rwork, ifaill,
+ ifailr, &info );
+ }
+ inline void hsein( char const side, char const eigsrc, char const initv,
+ logical_t* select, integer_t const n, traits::complex_d* h,
+ integer_t const ldh, traits::complex_d* w, traits::complex_d* vl,
+ integer_t const ldvl, traits::complex_d* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, traits::complex_d* work,
+ double* rwork, integer_t* ifaill, integer_t* ifailr,
+ integer_t& info ) {
+ LAPACK_ZHSEIN( &side, &eigsrc, &initv, select, &n,
+ traits::complex_ptr(h), &ldh, traits::complex_ptr(w),
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &mm, &m, traits::complex_ptr(work), rwork, ifaill,
+ ifailr, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct hsein_impl{};
+
+// real specialization
+template< typename ValueType >
+struct hsein_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixH, typename VectorWR,
+ typename VectorWI, typename MatrixVL, typename MatrixVR,
+ typename VectorIFAILL, typename VectorIFAILR, typename WORK >
+ static void compute( char const side, char const eigsrc, char const initv,
+ VectorSELECT& select, MatrixH& h, VectorWR& wr, VectorWI& wi,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'R' || side == 'L' || side == 'B' );
+ assert( eigsrc == 'Q' || eigsrc == 'N' );
+ assert( initv == 'N' || initv == 'U' );
+ assert( traits::vector_size(select) >= traits::matrix_size2(h) );
+ assert( traits::matrix_size2(h) >= 0 );
+ assert( traits::leading_dimension(h) >= std::max(1,
+ traits::matrix_size2(h)) );
+ assert( traits::vector_size(wr) >= traits::matrix_size2(h) );
+ assert( traits::vector_size(wi) >= traits::matrix_size2(h) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(h), ?2 )));
+#endif
+ detail::hsein( side, eigsrc, initv, traits::vector_storage(select),
+ traits::matrix_size2(h), traits::matrix_storage(h),
+ traits::leading_dimension(h), traits::vector_storage(wr),
+ traits::vector_storage(wi), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), mm, m,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(ifaill),
+ traits::vector_storage(ifailr), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixH, typename VectorWR,
+ typename VectorWI, typename MatrixVL, typename MatrixVR,
+ typename VectorIFAILL, typename VectorIFAILR >
+ static void compute( char const side, char const eigsrc, char const initv,
+ VectorSELECT& select, MatrixH& h, VectorWR& wr, VectorWI& wi,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(h), ?2 ) );
+ compute( side, eigsrc, initv, select, h, wr, wi, vl, vr, mm, m,
+ ifaill, ifailr, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixH, typename VectorWR,
+ typename VectorWI, typename MatrixVL, typename MatrixVR,
+ typename VectorIFAILL, typename VectorIFAILR >
+ static void compute( char const side, char const eigsrc, char const initv,
+ VectorSELECT& select, MatrixH& h, VectorWR& wr, VectorWI& wi,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr, integer_t& info,
+ optimal_workspace work ) {
+ compute( side, eigsrc, initv, select, h, wr, wi, vl, vr, mm, m,
+ ifaill, ifailr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n, ?? ) {
+ return (n+2)*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct hsein_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixH, typename VectorW,
+ typename MatrixVL, typename MatrixVR, typename VectorIFAILL,
+ typename VectorIFAILR, typename WORK, typename RWORK >
+ static void compute( char const side, char const eigsrc, char const initv,
+ VectorSELECT& select, MatrixH& h, VectorW& w, MatrixVL& vl,
+ MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'R' || side == 'L' || side == 'B' );
+ assert( eigsrc == 'Q' || eigsrc == 'N' );
+ assert( initv == 'N' || initv == 'U' );
+ assert( traits::vector_size(select) >= traits::matrix_size2(h) );
+ assert( traits::matrix_size2(h) >= 0 );
+ assert( traits::leading_dimension(h) >= std::max(1,
+ traits::matrix_size2(h)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(h) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(h) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(h) )));
+#endif
+ detail::hsein( side, eigsrc, initv, traits::vector_storage(select),
+ traits::matrix_size2(h), traits::matrix_storage(h),
+ traits::leading_dimension(h), traits::vector_storage(w),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr), mm,
+ m, traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(ifaill),
+ traits::vector_storage(ifailr), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixH, typename VectorW,
+ typename MatrixVL, typename MatrixVR, typename VectorIFAILL,
+ typename VectorIFAILR >
+ static void compute( char const side, char const eigsrc, char const initv,
+ VectorSELECT& select, MatrixH& h, VectorW& w, MatrixVL& vl,
+ MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(h) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(h) ) );
+ compute( side, eigsrc, initv, select, h, w, vl, vr, mm, m, ifaill,
+ ifailr, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixH, typename VectorW,
+ typename MatrixVL, typename MatrixVR, typename VectorIFAILL,
+ typename VectorIFAILR >
+ static void compute( char const side, char const eigsrc, char const initv,
+ VectorSELECT& select, MatrixH& h, VectorW& w, MatrixVL& vl,
+ MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr, integer_t& info,
+ optimal_workspace work ) {
+ compute( side, eigsrc, initv, select, h, w, vl, vr, mm, m, ifaill,
+ ifailr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hsein
+template< typename VectorSELECT, typename MatrixH, typename VectorWR,
+ typename VectorWI, typename MatrixVL, typename MatrixVR,
+ typename VectorIFAILL, typename VectorIFAILR, typename Workspace >
+inline integer_t hsein( char const side, char const eigsrc,
+ char const initv, VectorSELECT& select, MatrixH& h, VectorWR& wr,
+ VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t const mm,
+ integer_t& m, VectorIFAILL& ifaill, VectorIFAILR& ifailr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ hsein_impl< value_type >::compute( side, eigsrc, initv, select, h,
+ wr, wi, vl, vr, mm, m, ifaill, ifailr, info, work );
+ return info;
+}
+
+// template function to call hsein
+template< typename VectorSELECT, typename MatrixH, typename VectorW,
+ typename MatrixVL, typename MatrixVR, typename VectorIFAILL,
+ typename VectorIFAILR, typename Workspace >
+inline integer_t hsein( char const side, char const eigsrc,
+ char const initv, VectorSELECT& select, MatrixH& h, VectorW& w,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ VectorIFAILL& ifaill, VectorIFAILR& ifailr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ hsein_impl< value_type >::compute( side, eigsrc, initv, select, h, w,
+ vl, vr, mm, m, ifaill, ifailr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hseqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hseqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,214 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HSEQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HSEQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hseqr( char const job, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, float* h,
+ integer_t const ldh, float* wr, float* wi, float* z,
+ integer_t const ldz, float* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_SHSEQR( &job, &compz, &n, &ilo, &ihi, h, &ldh, wr, wi, z, &ldz,
+ work, &lwork, &info );
+ }
+ inline void hseqr( char const job, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, double* h,
+ integer_t const ldh, double* wr, double* wi, double* z,
+ integer_t const ldz, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DHSEQR( &job, &compz, &n, &ilo, &ihi, h, &ldh, wr, wi, z, &ldz,
+ work, &lwork, &info );
+ }
+ inline void hseqr( char const job, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, traits::complex_f* h,
+ integer_t const ldh, traits::complex_f* w, traits::complex_f* z,
+ integer_t const ldz, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CHSEQR( &job, &compz, &n, &ilo, &ihi, traits::complex_ptr(h),
+ &ldh, traits::complex_ptr(w), traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void hseqr( char const job, char const compz, integer_t const n,
+ integer_t const ilo, integer_t const ihi, traits::complex_d* h,
+ integer_t const ldh, traits::complex_d* w, traits::complex_d* z,
+ integer_t const ldz, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZHSEQR( &job, &compz, &n, &ilo, &ihi, traits::complex_ptr(h),
+ &ldh, traits::complex_ptr(w), traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct hseqr_impl{};
+
+// real specialization
+template< typename ValueType >
+struct hseqr_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixH, typename VectorWR, typename VectorWI,
+ typename MatrixZ, typename WORK >
+ static void compute( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h,
+ VectorWR& wr, VectorWI& wi, MatrixZ& z, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'S' );
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( traits::vector_size(wr) >= traits::matrix_size2(h) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::hseqr( job, compz, traits::matrix_size2(h), ilo, ihi,
+ traits::matrix_storage(h), traits::leading_dimension(h),
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixH, typename VectorWR, typename VectorWI,
+ typename MatrixZ >
+ static void compute( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h,
+ VectorWR& wr, VectorWI& wi, MatrixZ& z, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( job, compz, ilo, ihi, h, wr, wi, z, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixH, typename VectorWR, typename VectorWI,
+ typename MatrixZ >
+ static void compute( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h,
+ VectorWR& wr, VectorWI& wi, MatrixZ& z, integer_t& info,
+ optimal_workspace work ) {
+ compute( job, compz, ilo, ihi, h, wr, wi, z, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct hseqr_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixH, typename VectorW, typename MatrixZ,
+ typename WORK >
+ static void compute( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h, VectorW& w,
+ MatrixZ& z, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'S' );
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::hseqr( job, compz, traits::matrix_size2(h), ilo, ihi,
+ traits::matrix_storage(h), traits::leading_dimension(h),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixH, typename VectorW, typename MatrixZ >
+ static void compute( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h, VectorW& w,
+ MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( job, compz, ilo, ihi, h, w, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixH, typename VectorW, typename MatrixZ >
+ static void compute( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h, VectorW& w,
+ MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( job, compz, ilo, ihi, h, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call hseqr
+template< typename MatrixH, typename VectorWR, typename VectorWI,
+ typename MatrixZ, typename Workspace >
+inline integer_t hseqr( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h, VectorWR& wr,
+ VectorWI& wi, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
+ integer_t info(0);
+ hseqr_impl< value_type >::compute( job, compz, ilo, ihi, h, wr, wi,
+ z, info, work );
+ return info;
+}
+
+// template function to call hseqr
+template< typename MatrixH, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t hseqr( char const job, char const compz,
+ integer_t const ilo, integer_t const ihi, MatrixH& h, VectorW& w,
+ MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
+ integer_t info(0);
+ hseqr_impl< value_type >::compute( job, compz, ilo, ihi, h, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/labrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/labrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,156 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LABRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LABRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void labrd( integer_t const m, integer_t const n,
+ integer_t const nb, float* a, integer_t const lda, float* d,
+ float* e, float* tauq, float* taup, float* x, integer_t const ldx,
+ float* y, integer_t const ldy ) {
+ LAPACK_SLABRD( &m, &n, &nb, a, &lda, d, e, tauq, taup, x, &ldx, y,
+ &ldy );
+ }
+ inline void labrd( integer_t const m, integer_t const n,
+ integer_t const nb, double* a, integer_t const lda, double* d,
+ double* e, double* tauq, double* taup, double* x,
+ integer_t const ldx, double* y, integer_t const ldy ) {
+ LAPACK_DLABRD( &m, &n, &nb, a, &lda, d, e, tauq, taup, x, &ldx, y,
+ &ldy );
+ }
+ inline void labrd( integer_t const m, integer_t const n,
+ integer_t const nb, traits::complex_f* a, integer_t const lda,
+ float* d, float* e, traits::complex_f* tauq,
+ traits::complex_f* taup, traits::complex_f* x,
+ integer_t const ldx, traits::complex_f* y, integer_t const ldy ) {
+ LAPACK_CLABRD( &m, &n, &nb, traits::complex_ptr(a), &lda, d, e,
+ traits::complex_ptr(tauq), traits::complex_ptr(taup),
+ traits::complex_ptr(x), &ldx, traits::complex_ptr(y), &ldy );
+ }
+ inline void labrd( integer_t const m, integer_t const n,
+ integer_t const nb, traits::complex_d* a, integer_t const lda,
+ double* d, double* e, traits::complex_d* tauq,
+ traits::complex_d* taup, traits::complex_d* x,
+ integer_t const ldx, traits::complex_d* y, integer_t const ldy ) {
+ LAPACK_ZLABRD( &m, &n, &nb, traits::complex_ptr(a), &lda, d, e,
+ traits::complex_ptr(tauq), traits::complex_ptr(taup),
+ traits::complex_ptr(x), &ldx, traits::complex_ptr(y), &ldy );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct labrd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct labrd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP, typename MatrixX,
+ typename MatrixY >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, MatrixX& x, MatrixY& y ) {
+#ifndef NDEBUG
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(d) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(e) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(tauq) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(taup) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(x) >= traits::matrix_size1(a) );
+ assert( traits::leading_dimension(y) >= traits::matrix_size2(a) );
+#endif
+ detail::labrd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(d),
+ traits::vector_storage(e), traits::vector_storage(tauq),
+ traits::vector_storage(taup), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::matrix_storage(y),
+ traits::leading_dimension(y) );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct labrd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP, typename MatrixX,
+ typename MatrixY >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAUQ& tauq,
+ VectorTAUP& taup, MatrixX& x, MatrixY& y ) {
+#ifndef NDEBUG
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(d) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(e) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(tauq) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(taup) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(y) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::labrd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(d),
+ traits::vector_storage(e), traits::vector_storage(tauq),
+ traits::vector_storage(taup), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::matrix_storage(y),
+ traits::leading_dimension(y) );
+ }
+};
+
+
+// template function to call labrd
+template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAUQ, typename VectorTAUP, typename MatrixX,
+ typename MatrixY >
+inline integer_t labrd( MatrixA& a, VectorD& d, VectorE& e,
+ VectorTAUQ& tauq, VectorTAUP& taup, MatrixX& x, MatrixY& y ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ labrd_impl< value_type >::compute( a, d, e, tauq, taup, x, y );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/lacon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/lacon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,163 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LACON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LACON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void lacon( integer_t const n, float* v, float* x, integer_t* isgn,
+ float& est, integer_t& kase ) {
+ LAPACK_SLACON( &n, v, x, isgn, &est, &kase );
+ }
+ inline void lacon( integer_t const n, double* v, double* x,
+ integer_t* isgn, double& est, integer_t& kase ) {
+ LAPACK_DLACON( &n, v, x, isgn, &est, &kase );
+ }
+ inline void lacon( integer_t const n, traits::complex_f* v,
+ traits::complex_f* x, float& est, integer_t& kase ) {
+ LAPACK_CLACON( &n, traits::complex_ptr(v), traits::complex_ptr(x),
+ &est, &kase );
+ }
+ inline void lacon( integer_t const n, traits::complex_d* v,
+ traits::complex_d* x, double& est, integer_t& kase ) {
+ LAPACK_ZLACON( &n, traits::complex_ptr(v), traits::complex_ptr(x),
+ &est, &kase );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct lacon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct lacon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorX, typename V, typename ISGN >
+ static void compute( integer_t const n, VectorX& x, real_type& est,
+ integer_t& kase, detail::workspace2< V, ISGN > work ) {
+#ifndef NDEBUG
+ assert( n >= 1 );
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_v( n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_isgn( n )));
+#endif
+ detail::lacon( n, traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(x),
+ traits::vector_storage(work.select(integer_t())), est, kase );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorX >
+ static void compute( integer_t const n, VectorX& x, real_type& est,
+ integer_t& kase, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_v( min_size_v( n ) );
+ traits::detail::array< integer_t > tmp_isgn( min_size_isgn( n ) );
+ compute( n, x, est, kase, workspace( tmp_v, tmp_isgn ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorX >
+ static void compute( integer_t const n, VectorX& x, real_type& est,
+ integer_t& kase, optimal_workspace work ) {
+ compute( n, x, est, kase, minimal_workspace() );
+ }
+
+ static integer_t min_size_v( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_isgn( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct lacon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorX, typename V >
+ static void compute( integer_t const n, VectorX& x, real_type& est,
+ integer_t& kase, detail::workspace1< V > work ) {
+#ifndef NDEBUG
+ assert( n >= 1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_v( n )));
+#endif
+ detail::lacon( n, traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(x), est, kase );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorX >
+ static void compute( integer_t const n, VectorX& x, real_type& est,
+ integer_t& kase, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_v( min_size_v( n ) );
+ compute( n, x, est, kase, workspace( tmp_v ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorX >
+ static void compute( integer_t const n, VectorX& x, real_type& est,
+ integer_t& kase, optimal_workspace work ) {
+ compute( n, x, est, kase, minimal_workspace() );
+ }
+
+ static integer_t min_size_v( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call lacon
+template< typename VectorX, typename Workspace >
+inline integer_t lacon( integer_t const n, VectorX& x,
+ typename traits::vector_traits< VectorX >::value_type& est,
+ integer_t& kase, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ integer_t info(0);
+ lacon_impl< value_type >::compute( n, x, est, kase, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/laebz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/laebz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,157 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LAEBZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LAEBZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void laebz( integer_t const ijob, integer_t const nitmax,
+ integer_t const n, integer_t const mmax, integer_t const minp,
+ integer_t const nbmin, float const abstol, float const reltol,
+ float const pivmin, float* d, float* e, float* e2,
+ integer_t* nval, float* ab, float* c, integer_t& mout,
+ integer_t* nab, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SLAEBZ( &ijob, &nitmax, &n, &mmax, &minp, &nbmin, &abstol,
+ &reltol, &pivmin, d, e, e2, nval, ab, c, &mout, nab, work,
+ iwork, &info );
+ }
+ inline void laebz( integer_t const ijob, integer_t const nitmax,
+ integer_t const n, integer_t const mmax, integer_t const minp,
+ integer_t const nbmin, double const abstol, double const reltol,
+ double const pivmin, double* d, double* e, double* e2,
+ integer_t* nval, double* ab, double* c, integer_t& mout,
+ integer_t* nab, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DLAEBZ( &ijob, &nitmax, &n, &mmax, &minp, &nbmin, &abstol,
+ &reltol, &pivmin, d, e, e2, nval, ab, c, &mout, nab, work,
+ iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct laebz_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorE2,
+ typename VectorNVAL, typename MatrixAB, typename VectorC,
+ typename MatrixNAB, typename WORK, typename IWORK >
+ static void compute( integer_t const ijob, integer_t const nitmax,
+ integer_t const n, integer_t const minp, integer_t const nbmin,
+ real_type const abstol, real_type const reltol,
+ real_type const pivmin, VectorD& d, VectorE& e, VectorE2& e2,
+ VectorNVAL& nval, MatrixAB& ab, VectorC& c, integer_t& mout,
+ MatrixNAB& nab, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n );
+ assert( traits::vector_size(e2) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::leading_dimension(ab) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::leading_dimension(ab) )));
+#endif
+ detail::laebz( ijob, nitmax, n, traits::leading_dimension(ab), minp,
+ nbmin, abstol, reltol, pivmin, traits::vector_storage(d),
+ traits::vector_storage(e), traits::vector_storage(e2),
+ traits::vector_storage(nval), traits::matrix_storage(ab),
+ traits::vector_storage(c), mout, traits::matrix_storage(nab),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorE2,
+ typename VectorNVAL, typename MatrixAB, typename VectorC,
+ typename MatrixNAB >
+ static void compute( integer_t const ijob, integer_t const nitmax,
+ integer_t const n, integer_t const minp, integer_t const nbmin,
+ real_type const abstol, real_type const reltol,
+ real_type const pivmin, VectorD& d, VectorE& e, VectorE2& e2,
+ VectorNVAL& nval, MatrixAB& ab, VectorC& c, integer_t& mout,
+ MatrixNAB& nab, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::leading_dimension(ab) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::leading_dimension(ab) ) );
+ compute( ijob, nitmax, n, minp, nbmin, abstol, reltol, pivmin, d, e,
+ e2, nval, ab, c, mout, nab, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorE2,
+ typename VectorNVAL, typename MatrixAB, typename VectorC,
+ typename MatrixNAB >
+ static void compute( integer_t const ijob, integer_t const nitmax,
+ integer_t const n, integer_t const minp, integer_t const nbmin,
+ real_type const abstol, real_type const reltol,
+ real_type const pivmin, VectorD& d, VectorE& e, VectorE2& e2,
+ VectorNVAL& nval, MatrixAB& ab, VectorC& c, integer_t& mout,
+ MatrixNAB& nab, integer_t& info, optimal_workspace work ) {
+ compute( ijob, nitmax, n, minp, nbmin, abstol, reltol, pivmin, d, e,
+ e2, nval, ab, c, mout, nab, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const mmax ) {
+ return mmax;
+ }
+
+ static integer_t min_size_iwork( integer_t const mmax ) {
+ return mmax;
+ }
+};
+
+
+// template function to call laebz
+template< typename VectorD, typename VectorE, typename VectorE2,
+ typename VectorNVAL, typename MatrixAB, typename VectorC,
+ typename MatrixNAB, typename Workspace >
+inline integer_t laebz( integer_t const ijob, integer_t const nitmax,
+ integer_t const n, integer_t const minp, integer_t const nbmin,
+ typename traits::vector_traits< VectorD >::value_type const abstol,
+ typename traits::vector_traits< VectorD >::value_type const reltol,
+ typename traits::vector_traits< VectorD >::value_type const pivmin,
+ VectorD& d, VectorE& e, VectorE2& e2, VectorNVAL& nval, MatrixAB& ab,
+ VectorC& c, integer_t& mout, MatrixNAB& nab,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ laebz_impl< value_type >::compute( ijob, nitmax, n, minp, nbmin,
+ abstol, reltol, pivmin, d, e, e2, nval, ab, c, mout, nab, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/larz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/larz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,200 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LARZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LARZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void larz( char const side, integer_t const m, integer_t const n,
+ integer_t const l, float* v, integer_t const incv,
+ float const tau, float* c, integer_t const ldc, float* work ) {
+ LAPACK_SLARZ( &side, &m, &n, &l, v, &incv, &tau, c, &ldc, work );
+ }
+ inline void larz( char const side, integer_t const m, integer_t const n,
+ integer_t const l, double* v, integer_t const incv,
+ double const tau, double* c, integer_t const ldc, double* work ) {
+ LAPACK_DLARZ( &side, &m, &n, &l, v, &incv, &tau, c, &ldc, work );
+ }
+ inline void larz( char const side, integer_t const m, integer_t const n,
+ integer_t const l, traits::complex_f* v, integer_t const incv,
+ traits::complex_f const tau, traits::complex_f* c,
+ integer_t const ldc, traits::complex_f* work ) {
+ LAPACK_CLARZ( &side, &m, &n, &l, traits::complex_ptr(v), &incv,
+ traits::complex_ptr(&tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work) );
+ }
+ inline void larz( char const side, integer_t const m, integer_t const n,
+ integer_t const l, traits::complex_d* v, integer_t const incv,
+ traits::complex_d const tau, traits::complex_d* c,
+ integer_t const ldc, traits::complex_d* work ) {
+ LAPACK_ZLARZ( &side, &m, &n, &l, traits::complex_ptr(v), &incv,
+ traits::complex_ptr(&tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work) );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct larz_impl{};
+
+// real specialization
+template< typename ValueType >
+struct larz_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorV, typename MatrixC, typename WORK >
+ static void compute( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, real_type const tau, MatrixC& c,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::larz( side, traits::matrix_size1(c), traits::matrix_size2(c),
+ l, traits::vector_storage(v), incv, tau,
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())) );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorV, typename MatrixC >
+ static void compute( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, real_type const tau, MatrixC& c,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, l, v, incv, tau, c, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorV, typename MatrixC >
+ static void compute( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, real_type const tau, MatrixC& c,
+ optimal_workspace work ) {
+ compute( side, l, v, incv, tau, c, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return n;
+ else
+ return m;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct larz_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorV, typename MatrixC, typename WORK >
+ static void compute( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, traits::complex_f const tau, MatrixC& c,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::larz( side, traits::matrix_size1(c), traits::matrix_size2(c),
+ l, traits::vector_storage(v), incv, tau,
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())) );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorV, typename MatrixC >
+ static void compute( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, traits::complex_f const tau, MatrixC& c,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, l, v, incv, tau, c, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorV, typename MatrixC >
+ static void compute( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, traits::complex_f const tau, MatrixC& c,
+ optimal_workspace work ) {
+ compute( side, l, v, incv, tau, c, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return n;
+ else
+ return m;
+ }
+};
+
+
+// template function to call larz
+template< typename VectorV, typename MatrixC, typename Workspace >
+inline integer_t larz( char const side, integer_t const l, VectorV& v,
+ integer_t const incv,
+ typename traits::vector_traits< VectorV >::value_type const tau,
+ MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorV >::value_type value_type;
+ integer_t info(0);
+ larz_impl< value_type >::compute( side, l, v, incv, tau, c, work );
+ return info;
+}
+
+// template function to call larz
+template< typename VectorV, typename MatrixC, typename Workspace >
+inline integer_t larz( char const side, integer_t const l, VectorV& v,
+ integer_t const incv, traits::complex_f const tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorV >::value_type value_type;
+ integer_t info(0);
+ larz_impl< value_type >::compute( side, l, v, incv, tau, c, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,130 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LATRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LATRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void latrd( char const uplo, integer_t const n, integer_t const nb,
+ float* a, integer_t const lda, float* e, float* tau, float* w,
+ integer_t const ldw ) {
+ LAPACK_SLATRD( &uplo, &n, &nb, a, &lda, e, tau, w, &ldw );
+ }
+ inline void latrd( char const uplo, integer_t const n, integer_t const nb,
+ double* a, integer_t const lda, double* e, double* tau, double* w,
+ integer_t const ldw ) {
+ LAPACK_DLATRD( &uplo, &n, &nb, a, &lda, e, tau, w, &ldw );
+ }
+ inline void latrd( char const uplo, integer_t const n, integer_t const nb,
+ traits::complex_f* a, integer_t const lda, float* e,
+ traits::complex_f* tau, traits::complex_f* w,
+ integer_t const ldw ) {
+ LAPACK_CLATRD( &uplo, &n, &nb, traits::complex_ptr(a), &lda, e,
+ traits::complex_ptr(tau), traits::complex_ptr(w), &ldw );
+ }
+ inline void latrd( char const uplo, integer_t const n, integer_t const nb,
+ traits::complex_d* a, integer_t const lda, double* e,
+ traits::complex_d* tau, traits::complex_d* w,
+ integer_t const ldw ) {
+ LAPACK_ZLATRD( &uplo, &n, &nb, traits::complex_ptr(a), &lda, e,
+ traits::complex_ptr(tau), traits::complex_ptr(w), &ldw );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct latrd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct latrd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorE, typename VectorTAU,
+ typename MatrixW >
+ static void compute( char const uplo, integer_t const nb, MatrixA& a,
+ VectorE& e, VectorTAU& tau, MatrixW& w ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::leading_dimension(a) >= (ERROR) );
+ assert( traits::leading_dimension(w) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::latrd( uplo, traits::matrix_size2(a), nb,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(e), traits::vector_storage(tau),
+ traits::matrix_storage(w), traits::leading_dimension(w) );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct latrd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorE, typename VectorTAU,
+ typename MatrixW >
+ static void compute( char const uplo, integer_t const nb, MatrixA& a,
+ VectorE& e, VectorTAU& tau, MatrixW& w ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(w) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::latrd( uplo, traits::matrix_size2(a), nb,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(e), traits::vector_storage(tau),
+ traits::matrix_storage(w), traits::leading_dimension(w) );
+ }
+};
+
+
+// template function to call latrd
+template< typename MatrixA, typename VectorE, typename VectorTAU,
+ typename MatrixW >
+inline integer_t latrd( char const uplo, integer_t const nb, MatrixA& a,
+ VectorE& e, VectorTAU& tau, MatrixW& w ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ latrd_impl< value_type >::compute( uplo, nb, a, e, tau, w );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,108 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LATRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LATRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void latrs( char const uplo, char const trans, char const diag,
+ char const normin, integer_t const n, float* a,
+ integer_t const lda, float* x, float& scale, float* cnorm,
+ integer_t& info ) {
+ LAPACK_SLATRS( &uplo, &trans, &diag, &normin, &n, a, &lda, x, &scale,
+ cnorm, &info );
+ }
+ inline void latrs( char const uplo, char const trans, char const diag,
+ char const normin, integer_t const n, double* a,
+ integer_t const lda, double* x, double& scale, double* cnorm,
+ integer_t& info ) {
+ LAPACK_DLATRS( &uplo, &trans, &diag, &normin, &n, a, &lda, x, &scale,
+ cnorm, &info );
+ }
+ inline void latrs( char const uplo, char const trans, char const diag,
+ char const normin, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* x, float& scale,
+ float* cnorm, integer_t& info ) {
+ LAPACK_CLATRS( &uplo, &trans, &diag, &normin, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &scale,
+ cnorm, &info );
+ }
+ inline void latrs( char const uplo, char const trans, char const diag,
+ char const normin, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* x, double& scale,
+ double* cnorm, integer_t& info ) {
+ LAPACK_ZLATRS( &uplo, &trans, &diag, &normin, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(x), &scale,
+ cnorm, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct latrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorX, typename VectorCNORM >
+ static void compute( char const uplo, char const trans, char const diag,
+ char const normin, MatrixA& a, VectorX& x, real_type& scale,
+ VectorCNORM& cnorm, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( normin == 'Y' || normin == 'N' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= ?MAX );
+ assert( traits::vector_size(x) >= traits::matrix_size2(a) );
+#endif
+ detail::latrs( uplo, trans, diag, normin, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(x), scale,
+ traits::vector_storage(cnorm), info );
+ }
+};
+
+
+// template function to call latrs
+template< typename MatrixA, typename VectorX, typename VectorCNORM >
+inline integer_t latrs( char const uplo, char const trans,
+ char const diag, char const normin, MatrixA& a, VectorX& x,
+ typename traits::matrix_traits< MatrixA >::value_type& scale,
+ VectorCNORM& cnorm ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ latrs_impl< value_type >::compute( uplo, trans, diag, normin, a, x,
+ scale, cnorm, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/latrz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,170 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LATRZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LATRZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void latrz( integer_t const m, integer_t const n,
+ integer_t const l, float* a, integer_t const lda, float* tau,
+ float* work ) {
+ LAPACK_SLATRZ( &m, &n, &l, a, &lda, tau, work );
+ }
+ inline void latrz( integer_t const m, integer_t const n,
+ integer_t const l, double* a, integer_t const lda, double* tau,
+ double* work ) {
+ LAPACK_DLATRZ( &m, &n, &l, a, &lda, tau, work );
+ }
+ inline void latrz( integer_t const m, integer_t const n,
+ integer_t const l, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work ) {
+ LAPACK_CLATRZ( &m, &n, &l, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work) );
+ }
+ inline void latrz( integer_t const m, integer_t const n,
+ integer_t const l, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work ) {
+ LAPACK_ZLATRZ( &m, &n, &l, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work) );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct latrz_impl{};
+
+// real specialization
+template< typename ValueType >
+struct latrz_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= traits::matrix_size1(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a) )));
+#endif
+ detail::latrz( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())) );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a) ) );
+ compute( a, tau, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, optimal_workspace work ) {
+ compute( a, tau, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return m;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct latrz_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= traits::matrix_size1(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a) )));
+#endif
+ detail::latrz( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())) );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a) ) );
+ compute( a, tau, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, optimal_workspace work ) {
+ compute( a, tau, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return m;
+ }
+};
+
+
+// template function to call latrz
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t latrz( MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ latrz_impl< value_type >::compute( a, tau, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opgtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opgtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,110 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_OPGTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_OPGTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void opgtr( char const uplo, integer_t const n, float* ap,
+ float* tau, float* q, integer_t const ldq, float* work,
+ integer_t& info ) {
+ LAPACK_SOPGTR( &uplo, &n, ap, tau, q, &ldq, work, &info );
+ }
+ inline void opgtr( char const uplo, integer_t const n, double* ap,
+ double* tau, double* q, integer_t const ldq, double* work,
+ integer_t& info ) {
+ LAPACK_DOPGTR( &uplo, &n, ap, tau, q, &ldq, work, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct opgtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixQ,
+ typename WORK >
+ static void compute( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(q) >= 0 );
+ assert( traits::vector_size(ap) >=
+ traits::matrix_size2(q)*(traits::matrix_size2(q)+1)/2 );
+ assert( traits::vector_size(tau) >= traits::matrix_size2(q)-1 );
+ assert( traits::leading_dimension(q) >= std::max(1,
+ traits::matrix_size2(q)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(q) )));
+#endif
+ detail::opgtr( uplo, traits::matrix_size2(q),
+ traits::vector_storage(ap), traits::vector_storage(tau),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixQ >
+ static void compute( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(q) ) );
+ compute( uplo, ap, tau, q, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixQ >
+ static void compute( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( uplo, ap, tau, q, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n-1;
+ }
+};
+
+
+// template function to call opgtr
+template< typename VectorAP, typename VectorTAU, typename MatrixQ,
+ typename Workspace >
+inline integer_t opgtr( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorAP >::value_type value_type;
+ integer_t info(0);
+ opgtr_impl< value_type >::compute( uplo, ap, tau, q, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_OPMTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_OPMTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void opmtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, float* ap, float* tau,
+ float* c, integer_t const ldc, float* work, integer_t& info ) {
+ LAPACK_SOPMTR( &side, &uplo, &trans, &m, &n, ap, tau, c, &ldc, work,
+ &info );
+ }
+ inline void opmtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, double* ap, double* tau,
+ double* c, integer_t const ldc, double* work, integer_t& info ) {
+ LAPACK_DOPMTR( &side, &uplo, &trans, &m, &n, ap, tau, c, &ldc, work,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct opmtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const uplo, char const trans,
+ VectorAP& ap, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::opmtr( side, uplo, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), traits::vector_storage(ap),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const uplo, char const trans,
+ VectorAP& ap, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, uplo, trans, ap, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const uplo, char const trans,
+ VectorAP& ap, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ compute( side, uplo, trans, ap, tau, c, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return n;
+ else
+ return m;
+ }
+};
+
+
+// template function to call opmtr
+template< typename VectorAP, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t opmtr( char const side, char const uplo,
+ char const trans, VectorAP& ap, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorAP >::value_type value_type;
+ integer_t info(0);
+ opmtr_impl< value_type >::compute( side, uplo, trans, ap, tau, c,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgbr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgbr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGBR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGBR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orgbr( char const vect, integer_t const m, integer_t const n,
+ integer_t const k, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGBR( &vect, &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orgbr( char const vect, integer_t const m, integer_t const n,
+ integer_t const k, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGBR( &vect, &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orgbr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'Q' || vect == 'P' );
+ assert( m >= 0 );
+ assert( k >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ m, n )));
+#endif
+ detail::orgbr( vect, m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( m, n ) );
+ compute( vect, m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orgbr( vect, m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( vect, m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ return std::max( 1, std::min( m, n );
+ }
+};
+
+
+// template function to call orgbr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orgbr( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orgbr_impl< value_type >::compute( vect, m, n, k, a, tau, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,115 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGHR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGHR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orghr( integer_t const n, integer_t const ilo,
+ integer_t const ihi, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGHR( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orghr( integer_t const n, integer_t const ilo,
+ integer_t const ihi, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGHR( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orghr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::vector_size(tau) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::orghr( n, ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( n, ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orghr( n, ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( n, ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call orghr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orghr( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orghr_impl< value_type >::compute( n, ilo, ihi, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGLQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGLQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orglq( integer_t const m, integer_t const n,
+ integer_t const k, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGLQ( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orglq( integer_t const m, integer_t const n,
+ integer_t const k, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGLQ( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orglq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= m );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ m )));
+#endif
+ detail::orglq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( m ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orglq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call orglq
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orglq( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orglq_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGQL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGQL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orgql( integer_t const m, integer_t const n,
+ integer_t const k, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGQL( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orgql( integer_t const m, integer_t const n,
+ integer_t const k, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGQL( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orgql_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= n );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::orgql( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orgql( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+
+// template function to call orgql
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orgql( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orgql_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orgqr( integer_t const m, integer_t const n,
+ integer_t const k, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGQR( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orgqr( integer_t const m, integer_t const n,
+ integer_t const k, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGQR( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orgqr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= n );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::orgqr( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orgqr( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+
+// template function to call orgqr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orgqr( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orgqr_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGRQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGRQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orgrq( integer_t const m, integer_t const n,
+ integer_t const k, float* a, integer_t const lda, float* tau,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGRQ( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orgrq( integer_t const m, integer_t const n,
+ integer_t const k, double* a, integer_t const lda, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGRQ( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orgrq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= m );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ m )));
+#endif
+ detail::orgrq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( m ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orgrq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call orgrq
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orgrq( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orgrq_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,113 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORGTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORGTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void orgtr( char const uplo, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SORGTR( &uplo, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void orgtr( char const uplo, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DORGTR( &uplo, &n, a, &lda, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct orgtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const n, MatrixA& a, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::vector_size(tau) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::orgtr( traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, MatrixA& a, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( n, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, MatrixA& a, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::orgtr( traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( n, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n-1 );
+ }
+};
+
+
+// template function to call orgtr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t orgtr( integer_t const n, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ orgtr_impl< value_type >::compute( n, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormbr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormbr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMBR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMBR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormbr( char const vect, char const side, char const trans,
+ integer_t const m, integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMBR( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c,
+ &ldc, work, &lwork, &info );
+ }
+ inline void ormbr( char const vect, char const side, char const trans,
+ integer_t const m, integer_t const n, integer_t const k,
+ double* a, integer_t const lda, double* tau, double* c,
+ integer_t const ldc, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DORMBR( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c,
+ &ldc, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormbr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const vect, char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'Q' || vect == 'P' );
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( k >= 0 );
+ assert( traits::vector_size(tau) >= std::min(?NQ,k) );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormbr( vect, side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const vect, char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( vect, side, trans, k, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const vect, char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormbr( vect, side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( vect, side, trans, k, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormbr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormbr( char const vect, char const side,
+ char const trans, integer_t const k, MatrixA& a, VectorTAU& tau,
+ MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormbr_impl< value_type >::compute( vect, side, trans, k, a, tau, c,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormhr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormhr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,140 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMHR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMHR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormhr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ float* a, integer_t const lda, float* tau, float* c,
+ integer_t const ldc, float* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_SORMHR( &side, &trans, &m, &n, &ilo, &ihi, a, &lda, tau, c,
+ &ldc, work, &lwork, &info );
+ }
+ inline void ormhr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ double* a, integer_t const lda, double* tau, double* c,
+ integer_t const ldc, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DORMHR( &side, &trans, &m, &n, &ilo, &ihi, a, &lda, tau, c,
+ &ldc, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormhr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormhr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, ilo, ihi, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormhr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, ilo, ihi, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormhr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormhr( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a, VectorTAU& tau,
+ MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormhr_impl< value_type >::compute( side, trans, ilo, ihi, a, tau, c,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormlq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormlq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,135 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMLQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMLQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormlq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMLQ( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+ inline void ormlq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, double* a,
+ integer_t const lda, double* tau, double* c, integer_t const ldc,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORMLQ( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormlq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,k) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormlq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormlq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormlq
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormlq( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormlq_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormql.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormql.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMQL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMQL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormql( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMQL( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+ inline void ormql( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, double* a,
+ integer_t const lda, double* tau, double* c, integer_t const ldc,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORMQL( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormql_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormql( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormql( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormql
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormql( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormql_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormqr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMQR( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+ inline void ormqr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, double* a,
+ integer_t const lda, double* tau, double* c, integer_t const ldc,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORMQR( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormqr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormqr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormqr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormqr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormqr( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormqr_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormrq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormrq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,135 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMRQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMRQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormrq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMRQ( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+ inline void ormrq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, double* a,
+ integer_t const lda, double* tau, double* c, integer_t const ldc,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORMRQ( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormrq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,k) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormrq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormrq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormrq
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormrq( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormrq_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormrz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormrz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMRZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMRZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormrz( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, integer_t const l, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMRZ( &side, &trans, &m, &n, &k, &l, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ }
+ inline void ormrz( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, integer_t const l,
+ double* a, integer_t const lda, double* tau, double* c,
+ integer_t const ldc, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DORMRZ( &side, &trans, &m, &n, &k, &l, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormrz_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,k) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::ormrz( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormrz( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call ormrz
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormrz( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormrz_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,135 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ORMTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_ORMTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ormtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* c, integer_t const ldc,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SORMTR( &side, &uplo, &trans, &m, &n, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ }
+ inline void ormtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* c, integer_t const ldc,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DORMTR( &side, &uplo, &trans, &m, &n, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ormtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ side, traits::matrix_size1(c), traits::matrix_size2(c) )));
+#endif
+ detail::ormtr( side, traits::matrix_uplo_tag(a), trans,
+ traits::matrix_size1(c), traits::matrix_size2(c),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ormtr( side, traits::matrix_uplo_tag(a), trans,
+ traits::matrix_size1(c), traits::matrix_size2(c),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ormtr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t ormtr( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ormtr_impl< value_type >::compute( side, trans, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbcon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbcon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,200 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBCON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBCON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbcon( char const uplo, integer_t const n, integer_t const kd,
+ float* ab, integer_t const ldab, float const anorm, float& rcond,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SPBCON( &uplo, &n, &kd, ab, &ldab, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void pbcon( char const uplo, integer_t const n, integer_t const kd,
+ double* ab, integer_t const ldab, double const anorm,
+ double& rcond, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DPBCON( &uplo, &n, &kd, ab, &ldab, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void pbcon( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_f* ab, integer_t const ldab, float const anorm,
+ float& rcond, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPBCON( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, &anorm,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void pbcon( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_d* ab, integer_t const ldab, double const anorm,
+ double& rcond, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZPBCON( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, &anorm,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct pbcon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct pbcon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename WORK, typename IWORK >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, real_type const anorm,
+ real_type& rcond, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::pbcon( uplo, n, kd, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), anorm, rcond,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, real_type const anorm,
+ real_type& rcond, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( uplo, n, kd, ab, anorm, rcond, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, real_type const anorm,
+ real_type& rcond, integer_t& info, optimal_workspace work ) {
+ compute( uplo, n, kd, ab, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct pbcon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename WORK, typename RWORK >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, real_type const anorm,
+ real_type& rcond, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::pbcon( uplo, n, kd, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), anorm, rcond,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, real_type const anorm,
+ real_type& rcond, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( uplo, n, kd, ab, anorm, rcond, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, real_type const anorm,
+ real_type& rcond, integer_t& info, optimal_workspace work ) {
+ compute( uplo, n, kd, ab, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call pbcon
+template< typename MatrixAB, typename Workspace >
+inline integer_t pbcon( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab,
+ typename traits::matrix_traits< MatrixAB >::value_type const anorm,
+ typename traits::matrix_traits< MatrixAB >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbcon_impl< value_type >::compute( uplo, n, kd, ab, anorm, rcond,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbequ.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbequ.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBEQU_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBEQU_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbequ( char const uplo, integer_t const n, integer_t const kd,
+ float* ab, integer_t const ldab, float* s, float& scond,
+ float& amax, integer_t& info ) {
+ LAPACK_SPBEQU( &uplo, &n, &kd, ab, &ldab, s, &scond, &amax, &info );
+ }
+ inline void pbequ( char const uplo, integer_t const n, integer_t const kd,
+ double* ab, integer_t const ldab, double* s, double& scond,
+ double& amax, integer_t& info ) {
+ LAPACK_DPBEQU( &uplo, &n, &kd, ab, &ldab, s, &scond, &amax, &info );
+ }
+ inline void pbequ( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_f* ab, integer_t const ldab, float* s,
+ float& scond, float& amax, integer_t& info ) {
+ LAPACK_CPBEQU( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, s,
+ &scond, &amax, &info );
+ }
+ inline void pbequ( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_d* ab, integer_t const ldab, double* s,
+ double& scond, double& amax, integer_t& info ) {
+ LAPACK_ZPBEQU( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, s,
+ &scond, &amax, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pbequ_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename VectorS >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorS& s, real_type& scond,
+ real_type& amax, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+#endif
+ detail::pbequ( uplo, n, kd, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::vector_storage(s),
+ scond, amax, info );
+ }
+};
+
+
+// template function to call pbequ
+template< typename MatrixAB, typename VectorS >
+inline integer_t pbequ( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorS& s,
+ typename traits::matrix_traits< MatrixAB >::value_type& scond,
+ typename traits::matrix_traits< MatrixAB >::value_type& amax ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbequ_impl< value_type >::compute( uplo, n, kd, ab, s, scond, amax,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,243 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbrfs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, float* ab, integer_t const ldab, float* afb,
+ integer_t const ldafb, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float* ferr, float* berr, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SPBRFS( &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void pbrfs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, double* ab, integer_t const ldab,
+ double* afb, integer_t const ldafb, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DPBRFS( &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void pbrfs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, traits::complex_f* ab, integer_t const ldab,
+ traits::complex_f* afb, integer_t const ldafb,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CPBRFS( &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab), &ldab,
+ traits::complex_ptr(afb), &ldafb, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void pbrfs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, traits::complex_d* ab, integer_t const ldab,
+ traits::complex_d* afb, integer_t const ldafb,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZPBRFS( &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab), &ldab,
+ traits::complex_ptr(afb), &ldafb, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct pbrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct pbrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixAFB& afb, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(afb) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::pbrfs( traits::matrix_uplo_tag(a), n, kd,
+ traits::matrix_size2(x), traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::matrix_storage(afb),
+ traits::leading_dimension(afb), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixAFB& afb, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( n, kd, ab, afb, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixAFB& afb, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( n, kd, ab, afb, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct pbrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixAFB& afb, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(afb) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::pbrfs( traits::matrix_uplo_tag(a), n, kd,
+ traits::matrix_size2(x), traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::matrix_storage(afb),
+ traits::leading_dimension(afb), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixAFB& afb, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( n, kd, ab, afb, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixAFB& afb, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( n, kd, ab, afb, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call pbrfs
+template< typename MatrixAB, typename MatrixAFB, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t pbrfs( integer_t const n, integer_t const kd,
+ MatrixAB& ab, MatrixAFB& afb, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbrfs_impl< value_type >::compute( n, kd, ab, afb, b, x, ferr, berr,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbstf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbstf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBSTF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBSTF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbstf( char const uplo, integer_t const n, integer_t const kd,
+ float* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_SPBSTF( &uplo, &n, &kd, ab, &ldab, &info );
+ }
+ inline void pbstf( char const uplo, integer_t const n, integer_t const kd,
+ double* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_DPBSTF( &uplo, &n, &kd, ab, &ldab, &info );
+ }
+ inline void pbstf( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_f* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_CPBSTF( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, &info );
+ }
+ inline void pbstf( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_d* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_ZPBSTF( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pbstf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+#endif
+ detail::pbstf( traits::matrix_uplo_tag(a), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ info );
+ }
+};
+
+
+// template function to call pbstf
+template< typename MatrixAB >
+inline integer_t pbstf( integer_t const n, integer_t const kd,
+ MatrixAB& ab ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbstf_impl< value_type >::compute( n, kd, ab, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbtrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbtrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBTRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBTRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbtrf( char const uplo, integer_t const n, integer_t const kd,
+ float* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_SPBTRF( &uplo, &n, &kd, ab, &ldab, &info );
+ }
+ inline void pbtrf( char const uplo, integer_t const n, integer_t const kd,
+ double* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_DPBTRF( &uplo, &n, &kd, ab, &ldab, &info );
+ }
+ inline void pbtrf( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_f* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_CPBTRF( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, &info );
+ }
+ inline void pbtrf( char const uplo, integer_t const n, integer_t const kd,
+ traits::complex_d* ab, integer_t const ldab, integer_t& info ) {
+ LAPACK_ZPBTRF( &uplo, &n, &kd, traits::complex_ptr(ab), &ldab, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pbtrf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB >
+ static void compute( integer_t const n, integer_t const kd, MatrixAB& ab,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+#endif
+ detail::pbtrf( traits::matrix_uplo_tag(a), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ info );
+ }
+};
+
+
+// template function to call pbtrf
+template< typename MatrixAB >
+inline integer_t pbtrf( integer_t const n, integer_t const kd,
+ MatrixAB& ab ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbtrf_impl< value_type >::compute( n, kd, ab, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbtrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pbtrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbtrs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, float* ab, integer_t const ldab, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SPBTRS( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ }
+ inline void pbtrs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, double* ab, integer_t const ldab, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DPBTRS( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ }
+ inline void pbtrs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, traits::complex_f* ab, integer_t const ldab,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CPBTRS( &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab), &ldab,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void pbtrs( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, traits::complex_d* ab, integer_t const ldab,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPBTRS( &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab), &ldab,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pbtrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename MatrixB >
+ static void compute( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::pbtrs( uplo, n, kd, traits::matrix_size2(b),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call pbtrs
+template< typename MatrixAB, typename MatrixB >
+inline integer_t pbtrs( char const uplo, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbtrs_impl< value_type >::compute( uplo, n, kd, ab, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pocon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pocon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POCON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POCON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pocon( char const uplo, integer_t const n, float* a,
+ integer_t const lda, float const anorm, float& rcond, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SPOCON( &uplo, &n, a, &lda, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void pocon( char const uplo, integer_t const n, double* a,
+ integer_t const lda, double const anorm, double& rcond,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DPOCON( &uplo, &n, a, &lda, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void pocon( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float const anorm,
+ float& rcond, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPOCON( &uplo, &n, traits::complex_ptr(a), &lda, &anorm,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void pocon( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double const anorm,
+ double& rcond, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZPOCON( &uplo, &n, traits::complex_ptr(a), &lda, &anorm,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct pocon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct pocon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename WORK, typename IWORK >
+ static void compute( MatrixA& a, real_type const anorm, real_type& rcond,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::pocon( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ anorm, rcond,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA >
+ static void compute( MatrixA& a, real_type const anorm, real_type& rcond,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( a, anorm, rcond, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA >
+ static void compute( MatrixA& a, real_type const anorm, real_type& rcond,
+ integer_t& info, optimal_workspace work ) {
+ compute( a, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct pocon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename WORK, typename RWORK >
+ static void compute( MatrixA& a, real_type const anorm, real_type& rcond,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::pocon( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ anorm, rcond,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA >
+ static void compute( MatrixA& a, real_type const anorm, real_type& rcond,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( a, anorm, rcond, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA >
+ static void compute( MatrixA& a, real_type const anorm, real_type& rcond,
+ integer_t& info, optimal_workspace work ) {
+ compute( a, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call pocon
+template< typename MatrixA, typename Workspace >
+inline integer_t pocon( MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const anorm,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ pocon_impl< value_type >::compute( a, anorm, rcond, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/poequ.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/poequ.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,90 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POEQU_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POEQU_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void poequ( integer_t const n, float* a, integer_t const lda,
+ float* s, float& scond, float& amax, integer_t& info ) {
+ LAPACK_SPOEQU( &n, a, &lda, s, &scond, &amax, &info );
+ }
+ inline void poequ( integer_t const n, double* a, integer_t const lda,
+ double* s, double& scond, double& amax, integer_t& info ) {
+ LAPACK_DPOEQU( &n, a, &lda, s, &scond, &amax, &info );
+ }
+ inline void poequ( integer_t const n, traits::complex_f* a,
+ integer_t const lda, float* s, float& scond, float& amax,
+ integer_t& info ) {
+ LAPACK_CPOEQU( &n, traits::complex_ptr(a), &lda, s, &scond, &amax,
+ &info );
+ }
+ inline void poequ( integer_t const n, traits::complex_d* a,
+ integer_t const lda, double* s, double& scond, double& amax,
+ integer_t& info ) {
+ LAPACK_ZPOEQU( &n, traits::complex_ptr(a), &lda, s, &scond, &amax,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct poequ_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorS >
+ static void compute( MatrixA& a, VectorS& s, real_type& scond,
+ real_type& amax, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::poequ( traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(s),
+ scond, amax, info );
+ }
+};
+
+
+// template function to call poequ
+template< typename MatrixA, typename VectorS >
+inline integer_t poequ( MatrixA& a, VectorS& s,
+ typename traits::matrix_traits< MatrixA >::value_type& scond,
+ typename traits::matrix_traits< MatrixA >::value_type& amax ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ poequ_impl< value_type >::compute( a, s, scond, amax, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/porfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/porfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,250 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PORFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PORFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void porfs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* af,
+ integer_t const ldaf, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float* ferr, float* berr, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SPORFS( &uplo, &n, &nrhs, a, &lda, af, &ldaf, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ }
+ inline void porfs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* af,
+ integer_t const ldaf, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DPORFS( &uplo, &n, &nrhs, a, &lda, af, &ldaf, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ }
+ inline void porfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPORFS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void porfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZPORFS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct porfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct porfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::porfs( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( a, af, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( a, af, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct porfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::porfs( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( a, af, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( a, af, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call porfs
+template< typename MatrixA, typename MatrixAF, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t porfs( MatrixA& a, MatrixAF& af, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ porfs_impl< value_type >::compute( a, af, b, x, ferr, berr, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,85 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POTRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POTRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void potrf( char const uplo, integer_t const n, float* a,
+ integer_t const lda, integer_t& info ) {
+ LAPACK_SPOTRF( &uplo, &n, a, &lda, &info );
+ }
+ inline void potrf( char const uplo, integer_t const n, double* a,
+ integer_t const lda, integer_t& info ) {
+ LAPACK_DPOTRF( &uplo, &n, a, &lda, &info );
+ }
+ inline void potrf( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t& info ) {
+ LAPACK_CPOTRF( &uplo, &n, traits::complex_ptr(a), &lda, &info );
+ }
+ inline void potrf( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t& info ) {
+ LAPACK_ZPOTRF( &uplo, &n, traits::complex_ptr(a), &lda, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct potrf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA >
+ static void compute( MatrixA& a, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::potrf( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ info );
+ }
+};
+
+
+// template function to call potrf
+template< typename MatrixA >
+inline integer_t potrf( MatrixA& a ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ potrf_impl< value_type >::compute( a, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potri.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potri.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,85 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POTRI_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POTRI_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void potri( char const uplo, integer_t const n, float* a,
+ integer_t const lda, integer_t& info ) {
+ LAPACK_SPOTRI( &uplo, &n, a, &lda, &info );
+ }
+ inline void potri( char const uplo, integer_t const n, double* a,
+ integer_t const lda, integer_t& info ) {
+ LAPACK_DPOTRI( &uplo, &n, a, &lda, &info );
+ }
+ inline void potri( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t& info ) {
+ LAPACK_CPOTRI( &uplo, &n, traits::complex_ptr(a), &lda, &info );
+ }
+ inline void potri( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t& info ) {
+ LAPACK_ZPOTRI( &uplo, &n, traits::complex_ptr(a), &lda, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct potri_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA >
+ static void compute( MatrixA& a, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::potri( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ info );
+ }
+};
+
+
+// template function to call potri
+template< typename MatrixA >
+inline integer_t potri( MatrixA& a ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ potri_impl< value_type >::compute( a, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/potrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void potrs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SPOTRS( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ }
+ inline void potrs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DPOTRS( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ }
+ inline void potrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CPOTRS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void potrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPOTRS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct potrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( MatrixA& a, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::potrs( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call potrs
+template< typename MatrixA, typename MatrixB >
+inline integer_t potrs( MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ potrs_impl< value_type >::compute( a, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pprfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pprfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,230 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PPRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PPRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, float* afp, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SPPRFS( &uplo, &n, &nrhs, ap, afp, b, &ldb, x, &ldx, ferr,
+ berr, work, iwork, &info );
+ }
+ inline void pprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, double* afp, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DPPRFS( &uplo, &n, &nrhs, ap, afp, b, &ldb, x, &ldx, ferr,
+ berr, work, iwork, &info );
+ }
+ inline void pprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* afp, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* x, integer_t const ldx, float* ferr,
+ float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPPRFS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void pprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* afp, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* x, integer_t const ldx, double* ferr,
+ double* berr, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZPPRFS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct pprfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct pprfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(afp) >= n*(n+1)/2 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::pprfs( traits::matrix_uplo_tag(a), n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::vector_storage(afp),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( n, ap, afp, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( n, ap, afp, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct pprfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(afp) >= n*(n+1)/2 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::pprfs( traits::matrix_uplo_tag(a), n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::vector_storage(afp),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( n, ap, afp, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( n, ap, afp, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call pprfs
+template< typename MatrixAP, typename VectorAFP, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t pprfs( integer_t const n, MatrixAP& ap, VectorAFP& afp,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ pprfs_impl< value_type >::compute( n, ap, afp, b, x, ferr, berr,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pptrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pptrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,92 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PPTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PPTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, float* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_SPPTRS( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ }
+ inline void pptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DPPTRS( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ }
+ inline void pptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap, traits::complex_f* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_CPPTRS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void pptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap, traits::complex_d* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPPTRS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pptrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorAP, typename MatrixB >
+ static void compute( integer_t const n, VectorAP& ap, MatrixB& b,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::pptrs( traits::matrix_uplo_tag(a), n, traits::matrix_size2(b),
+ traits::vector_storage(ap), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call pptrs
+template< typename VectorAP, typename MatrixB >
+inline integer_t pptrs( integer_t const n, VectorAP& ap, MatrixB& b ) {
+ typedef typename traits::vector_traits< VectorAP >::value_type value_type;
+ integer_t info(0);
+ pptrs_impl< value_type >::compute( n, ap, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,119 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PTEQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PTEQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pteqr( char const compz, integer_t const n, float* d,
+ float* e, float* z, integer_t const ldz, float* work,
+ integer_t& info ) {
+ LAPACK_SPTEQR( &compz, &n, d, e, z, &ldz, work, &info );
+ }
+ inline void pteqr( char const compz, integer_t const n, double* d,
+ double* e, double* z, integer_t const ldz, double* work,
+ integer_t& info ) {
+ LAPACK_DPTEQR( &compz, &n, d, e, z, &ldz, work, &info );
+ }
+ inline void pteqr( char const compz, integer_t const n, float* d,
+ float* e, traits::complex_f* z, integer_t const ldz, float* work,
+ integer_t& info ) {
+ LAPACK_CPTEQR( &compz, &n, d, e, traits::complex_ptr(z), &ldz, work,
+ &info );
+ }
+ inline void pteqr( char const compz, integer_t const n, double* d,
+ double* e, traits::complex_d* z, integer_t const ldz,
+ double* work, integer_t& info ) {
+ LAPACK_ZPTEQR( &compz, &n, d, e, traits::complex_ptr(z), &ldz, work,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pteqr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename WORK >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( compz == 'N' || compz == 'V' || compz == 'I' );
+ assert( n >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::pteqr( compz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( compz, n, d, e, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( compz, n, d, e, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 4*n;
+ }
+};
+
+
+// template function to call pteqr
+template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename Workspace >
+inline integer_t pteqr( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ pteqr_impl< value_type >::compute( compz, n, d, e, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,255 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PTRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PTRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ptrfs( integer_t const n, integer_t const nrhs, float* d,
+ float* e, float* df, float* ef, float* b, integer_t const ldb,
+ float* x, integer_t const ldx, float* ferr, float* berr,
+ float* work, integer_t& info ) {
+ LAPACK_SPTRFS( &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, ferr, berr,
+ work, &info );
+ }
+ inline void ptrfs( integer_t const n, integer_t const nrhs, double* d,
+ double* e, double* df, double* ef, double* b, integer_t const ldb,
+ double* x, integer_t const ldx, double* ferr, double* berr,
+ double* work, integer_t& info ) {
+ LAPACK_DPTRFS( &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, ferr, berr,
+ work, &info );
+ }
+ inline void ptrfs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* d, traits::complex_f* e, float* df,
+ traits::complex_f* ef, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* x, integer_t const ldx, float* ferr,
+ float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPTRFS( &uplo, &n, &nrhs, d, traits::complex_ptr(e), df,
+ traits::complex_ptr(ef), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void ptrfs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* d, traits::complex_d* e, double* df,
+ traits::complex_d* ef, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* x, integer_t const ldx, double* ferr,
+ double* berr, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZPTRFS( &uplo, &n, &nrhs, d, traits::complex_ptr(e), df,
+ traits::complex_ptr(ef), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ptrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ptrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(df) >= n );
+ assert( traits::vector_size(ef) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::ptrfs( n, traits::matrix_size2(b), traits::vector_storage(d),
+ traits::vector_storage(e), traits::vector_storage(df),
+ traits::vector_storage(ef), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( n, d, e, df, ef, b, x, ferr, berr, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( n, d, e, df, ef, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ptrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename RWORK >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(df) >= n );
+ assert( traits::vector_size(ef) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::ptrfs( uplo, n, traits::matrix_size2(b),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(df), traits::vector_storage(ef),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( uplo, n, d, e, df, ef, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, n, d, e, df, ef, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call ptrfs
+template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename Workspace >
+inline integer_t ptrfs( integer_t const n, VectorD& d, VectorE& e,
+ VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ ptrfs_impl< value_type >::compute( n, d, e, df, ef, b, x, ferr, berr,
+ info, work );
+ return info;
+}
+
+// template function to call ptrfs
+template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename Workspace >
+inline integer_t ptrfs( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ ptrfs_impl< value_type >::compute( uplo, n, d, e, df, ef, b, x, ferr,
+ berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PTTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PTTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pttrs( integer_t const n, integer_t const nrhs, float* d,
+ float* e, float* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_SPTTRS( &n, &nrhs, d, e, b, &ldb, &info );
+ }
+ inline void pttrs( integer_t const n, integer_t const nrhs, double* d,
+ double* e, double* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_DPTTRS( &n, &nrhs, d, e, b, &ldb, &info );
+ }
+ inline void pttrs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* d, traits::complex_f* e,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CPTTRS( &uplo, &n, &nrhs, d, traits::complex_ptr(e),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void pttrs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* d, traits::complex_d* e,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPTTRS( &uplo, &n, &nrhs, d, traits::complex_ptr(e),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct pttrs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct pttrs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::pttrs( n, traits::matrix_size2(b), traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct pttrs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::pttrs( uplo, n, traits::matrix_size2(b),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call pttrs
+template< typename VectorD, typename VectorE, typename MatrixB >
+inline integer_t pttrs( integer_t const n, VectorD& d, VectorE& e,
+ MatrixB& b ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ pttrs_impl< value_type >::compute( n, d, e, b, info );
+ return info;
+}
+
+// template function to call pttrs
+template< typename VectorD, typename VectorE, typename MatrixB >
+inline integer_t pttrs( char const uplo, integer_t const n, VectorD& d,
+ VectorE& e, MatrixB& b ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ pttrs_impl< value_type >::compute( uplo, n, d, e, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sbgst.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sbgst.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,123 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBGST_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBGST_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbgst( char const vect, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, float* ab,
+ integer_t const ldab, float* bb, integer_t const ldbb, float* x,
+ integer_t const ldx, float* work, integer_t& info ) {
+ LAPACK_SSBGST( &vect, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, x,
+ &ldx, work, &info );
+ }
+ inline void sbgst( char const vect, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, double* ab,
+ integer_t const ldab, double* bb, integer_t const ldbb, double* x,
+ integer_t const ldx, double* work, integer_t& info ) {
+ LAPACK_DSBGST( &vect, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, x,
+ &ldx, work, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbgst_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixX,
+ typename WORK >
+ static void compute( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixX& x, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'N' || vect == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= kb );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::sbgst( vect, traits::matrix_uplo_tag(a), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixX >
+ static void compute( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixX& x, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( vect, n, ka, kb, ab, bb, x, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixX >
+ static void compute( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixX& x, integer_t& info,
+ optimal_workspace work ) {
+ compute( vect, n, ka, kb, ab, bb, x, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call sbgst
+template< typename MatrixAB, typename MatrixBB, typename MatrixX,
+ typename Workspace >
+inline integer_t sbgst( char const vect, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab, MatrixBB& bb,
+ MatrixX& x, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbgst_impl< value_type >::compute( vect, n, ka, kb, ab, bb, x, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sbtrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sbtrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBTRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBTRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbtrd( char const vect, char const uplo, integer_t const n,
+ integer_t const kd, float* ab, integer_t const ldab, float* d,
+ float* e, float* q, integer_t const ldq, float* work,
+ integer_t& info ) {
+ LAPACK_SSBTRD( &vect, &uplo, &n, &kd, ab, &ldab, d, e, q, &ldq, work,
+ &info );
+ }
+ inline void sbtrd( char const vect, char const uplo, integer_t const n,
+ integer_t const kd, double* ab, integer_t const ldab, double* d,
+ double* e, double* q, integer_t const ldq, double* work,
+ integer_t& info ) {
+ LAPACK_DSBTRD( &vect, &uplo, &n, &kd, ab, &ldab, d, e, q, &ldq, work,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbtrd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename WORK >
+ static void compute( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
+ MatrixQ& q, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'N' || vect == 'V' || vect == 'U' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::sbtrd( vect, traits::matrix_uplo_tag(a), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ >
+ static void compute( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
+ MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( vect, n, kd, ab, d, e, q, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ >
+ static void compute( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e,
+ MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( vect, n, kd, ab, d, e, q, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call sbtrd
+template< typename MatrixAB, typename VectorD, typename VectorE,
+ typename MatrixQ, typename Workspace >
+inline integer_t sbtrd( char const vect, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorD& d, VectorE& e, MatrixQ& q,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbtrd_impl< value_type >::compute( vect, n, kd, ab, d, e, q, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sprfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sprfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,244 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, float* afp, integer_t* ipiv,
+ float* b, integer_t const ldb, float* x, integer_t const ldx,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_SSPRFS( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ }
+ inline void sprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, double* afp, integer_t* ipiv,
+ double* b, integer_t const ldb, double* x, integer_t const ldx,
+ double* ferr, double* berr, double* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_DSPRFS( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ }
+ inline void sprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* afp, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CSPRFS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void sprfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* afp, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZSPRFS( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct sprfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct sprfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(afp) >= n*(n+1)/2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::sprfs( traits::matrix_uplo_tag(a), n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(afp),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( n, ap, afp, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( n, ap, afp, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct sprfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(afp) >= n*(n+1)/2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::sprfs( traits::matrix_uplo_tag(a), n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(afp),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( n, ap, afp, ipiv, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( n, ap, afp, ipiv, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call sprfs
+template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t sprfs( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ sprfs_impl< value_type >::compute( n, ap, afp, ipiv, b, x, ferr,
+ berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sptrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sptrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, integer_t* ipiv, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SSPTRS( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ }
+ inline void sptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, integer_t* ipiv, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DSPTRS( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ }
+ inline void sptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CSPTRS( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void sptrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZSPTRS( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sptrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+ static void compute( char const uplo, integer_t const n, MatrixAP& ap,
+ VectorIPIV& ipiv, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(ap) >= n*(n+1)/2 );
+ assert( traits::vector_size(ipiv) >= n );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::sptrs( uplo, n, traits::matrix_size2(b),
+ traits::matrix_storage(ap), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call sptrs
+template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+inline integer_t sptrs( char const uplo, integer_t const n, MatrixAP& ap,
+ VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ sptrs_impl< value_type >::compute( uplo, n, ap, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stebz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stebz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,152 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEBZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEBZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stebz( char const range, char const order, integer_t const n,
+ float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, float* d, float* e,
+ integer_t& m, integer_t& nsplit, float* w, integer_t* iblock,
+ integer_t* isplit, float* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_SSTEBZ( &range, &order, &n, &vl, &vu, &il, &iu, &abstol, d, e,
+ &m, &nsplit, w, iblock, isplit, work, iwork, &info );
+ }
+ inline void stebz( char const range, char const order, integer_t const n,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, double* d, double* e,
+ integer_t& m, integer_t& nsplit, double* w, integer_t* iblock,
+ integer_t* isplit, double* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_DSTEBZ( &range, &order, &n, &vl, &vu, &il, &iu, &abstol, d, e,
+ &m, &nsplit, w, iblock, isplit, work, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stebz_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT, typename WORK,
+ typename IWORK >
+ static void compute( char const range, char const order,
+ integer_t const n, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ VectorD& d, VectorE& e, integer_t& m, integer_t& nsplit,
+ VectorW& w, VectorIBLOCK& iblock, VectorISPLIT& isplit,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( order == 'B' || order == 'E' );
+ assert( n >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(isplit) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::stebz( range, order, n, vl, vu, il, iu, abstol,
+ traits::vector_storage(d), traits::vector_storage(e), m,
+ nsplit, traits::vector_storage(w),
+ traits::vector_storage(iblock),
+ traits::vector_storage(isplit),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT >
+ static void compute( char const range, char const order,
+ integer_t const n, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ VectorD& d, VectorE& e, integer_t& m, integer_t& nsplit,
+ VectorW& w, VectorIBLOCK& iblock, VectorISPLIT& isplit,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w,
+ iblock, isplit, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT >
+ static void compute( char const range, char const order,
+ integer_t const n, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ VectorD& d, VectorE& e, integer_t& m, integer_t& nsplit,
+ VectorW& w, VectorIBLOCK& iblock, VectorISPLIT& isplit,
+ integer_t& info, optimal_workspace work ) {
+ compute( range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w,
+ iblock, isplit, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 4*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 3*n;
+ }
+};
+
+
+// template function to call stebz
+template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT, typename Workspace >
+inline integer_t stebz( char const range, char const order,
+ integer_t const n,
+ typename traits::vector_traits< VectorD >::value_type const vl,
+ typename traits::vector_traits< VectorD >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::vector_traits< VectorD >::value_type const abstol,
+ VectorD& d, VectorE& e, integer_t& m, integer_t& nsplit, VectorW& w,
+ VectorIBLOCK& iblock, VectorISPLIT& isplit,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stebz_impl< value_type >::compute( range, order, n, vl, vu, il, iu,
+ abstol, d, e, m, nsplit, w, iblock, isplit, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,239 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEDC_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEDC_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stedc( char const compz, integer_t const n, float* d,
+ float* e, float* z, integer_t const ldz, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_SSTEDC( &compz, &n, d, e, z, &ldz, work, &lwork, iwork,
+ &liwork, &info );
+ }
+ inline void stedc( char const compz, integer_t const n, double* d,
+ double* e, double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSTEDC( &compz, &n, d, e, z, &ldz, work, &lwork, iwork,
+ &liwork, &info );
+ }
+ inline void stedc( char const compz, integer_t const n, float* d,
+ float* e, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_CSTEDC( &compz, &n, d, e, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ }
+ inline void stedc( char const compz, integer_t const n, double* d,
+ double* e, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_ZSTEDC( &compz, &n, d, e, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct stedc_impl{};
+
+// real specialization
+template< typename ValueType >
+struct stedc_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename WORK, typename IWORK >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( compz, n )));
+#endif
+ detail::stedc( compz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( compz,
+ n ) );
+ compute( compz, n, d, e, z, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::stedc( compz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( compz, n, d, e, z, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( char const compz, integer_t const n ) {
+ // some formula
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct stedc_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, detail::workspace3< WORK,
+ RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( compz == 'N' || compz == 'I' || compz == 'V' );
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( compz, n )));
+#endif
+ detail::stedc( compz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( compz,
+ n ) );
+ compute( compz, n, d, e, z, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::stedc( compz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_rwork, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( compz, n, d, e, z, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_rwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( char const compz, integer_t const n ) {
+ // some formula
+ }
+};
+
+
+// template function to call stedc
+template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename Workspace >
+inline integer_t stedc( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stedc_impl< value_type >::compute( compz, n, d, e, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,182 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEGR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEGR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stegr( char const jobz, char const range, integer_t const n,
+ float* d, float* e, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, float* z, integer_t const ldz,
+ integer_t* isuppz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_SSTEGR( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, z, &ldz, isuppz, work, &lwork, iwork, &liwork, &info );
+ }
+ inline void stegr( char const jobz, char const range, integer_t const n,
+ double* d, double* e, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, double* z, integer_t const ldz,
+ integer_t* isuppz, double* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_DSTEGR( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, z, &ldz, isuppz, work, &lwork, iwork, &liwork, &info );
+ }
+ inline void stegr( char const jobz, char const range, integer_t const n,
+ float* d, float* e, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, traits::complex_f* z, integer_t const ldz,
+ integer_t* isuppz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_CSTEGR( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, traits::complex_ptr(z), &ldz, isuppz, work, &lwork,
+ iwork, &liwork, &info );
+ }
+ inline void stegr( char const jobz, char const range, integer_t const n,
+ double* d, double* e, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, traits::complex_d* z,
+ integer_t const ldz, integer_t* isuppz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_ZSTEGR( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, traits::complex_ptr(z), &ldz, isuppz, work, &lwork,
+ iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stegr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ, typename WORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( n >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( $CALL_MIN_SIZE )));
+#endif
+ detail::stegr( jobz, range, n, traits::vector_storage(d),
+ traits::vector_storage(e), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ compute( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z,
+ isuppz, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::stegr( jobz, range, n, traits::vector_storage(d),
+ traits::vector_storage(e), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ &opt_size_work, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z,
+ isuppz, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call stegr
+template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ, typename Workspace >
+inline integer_t stegr( char const jobz, char const range,
+ integer_t const n, VectorD& d, VectorE& e,
+ typename traits::vector_traits< VectorD >::value_type const vl,
+ typename traits::vector_traits< VectorD >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::vector_traits< VectorD >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stegr_impl< value_type >::compute( jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, isuppz, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,155 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEIN_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEIN_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stein( integer_t const n, float* d, float* e,
+ integer_t const m, float* w, integer_t* iblock, integer_t* isplit,
+ float* z, integer_t const ldz, float* work, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_SSTEIN( &n, d, e, &m, w, iblock, isplit, z, &ldz, work, iwork,
+ ifail, &info );
+ }
+ inline void stein( integer_t const n, double* d, double* e,
+ integer_t const m, double* w, integer_t* iblock,
+ integer_t* isplit, double* z, integer_t const ldz, double* work,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_DSTEIN( &n, d, e, &m, w, iblock, isplit, z, &ldz, work, iwork,
+ ifail, &info );
+ }
+ inline void stein( integer_t const n, float* d, float* e,
+ integer_t const m, float* w, integer_t* iblock, integer_t* isplit,
+ traits::complex_f* z, integer_t const ldz, float* work,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_CSTEIN( &n, d, e, &m, w, iblock, isplit,
+ traits::complex_ptr(z), &ldz, work, iwork, ifail, &info );
+ }
+ inline void stein( integer_t const n, double* d, double* e,
+ integer_t const m, double* w, integer_t* iblock,
+ integer_t* isplit, traits::complex_d* z, integer_t const ldz,
+ double* work, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_ZSTEIN( &n, d, e, &m, w, iblock, isplit,
+ traits::complex_ptr(z), &ldz, work, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stein_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT, typename MatrixZ,
+ typename VectorIFAIL, typename WORK, typename IWORK >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ integer_t const m, VectorW& w, VectorIBLOCK& iblock,
+ VectorISPLIT& isplit, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(isplit) >= n );
+ assert( traits::leading_dimension(z) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::stein( n, traits::vector_storage(d),
+ traits::vector_storage(e), m, traits::vector_storage(w),
+ traits::vector_storage(iblock),
+ traits::vector_storage(isplit), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ integer_t const m, VectorW& w, VectorIBLOCK& iblock,
+ VectorISPLIT& isplit, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( n, d, e, m, w, iblock, isplit, z, ifail, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ integer_t const m, VectorW& w, VectorIBLOCK& iblock,
+ VectorISPLIT& isplit, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, optimal_workspace work ) {
+ compute( n, d, e, m, w, iblock, isplit, z, ifail, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 5*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call stein
+template< typename VectorD, typename VectorE, typename VectorW,
+ typename VectorIBLOCK, typename VectorISPLIT, typename MatrixZ,
+ typename VectorIFAIL, typename Workspace >
+inline integer_t stein( integer_t const n, VectorD& d, VectorE& e,
+ integer_t const m, VectorW& w, VectorIBLOCK& iblock,
+ VectorISPLIT& isplit, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stein_impl< value_type >::compute( n, d, e, m, w, iblock, isplit, z,
+ ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,119 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void steqr( char const compz, integer_t const n, float* d,
+ float* e, float* z, integer_t const ldz, float* work,
+ integer_t& info ) {
+ LAPACK_SSTEQR( &compz, &n, d, e, z, &ldz, work, &info );
+ }
+ inline void steqr( char const compz, integer_t const n, double* d,
+ double* e, double* z, integer_t const ldz, double* work,
+ integer_t& info ) {
+ LAPACK_DSTEQR( &compz, &n, d, e, z, &ldz, work, &info );
+ }
+ inline void steqr( char const compz, integer_t const n, float* d,
+ float* e, traits::complex_f* z, integer_t const ldz, float* work,
+ integer_t& info ) {
+ LAPACK_CSTEQR( &compz, &n, d, e, traits::complex_ptr(z), &ldz, work,
+ &info );
+ }
+ inline void steqr( char const compz, integer_t const n, double* d,
+ double* e, traits::complex_d* z, integer_t const ldz,
+ double* work, integer_t& info ) {
+ LAPACK_ZSTEQR( &compz, &n, d, e, traits::complex_ptr(z), &ldz, work,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct steqr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename WORK >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( compz == 'N' || compz == 'V' || compz == 'I' );
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::steqr( compz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( compz, n, d, e, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( compz, n, d, e, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call steqr
+template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename Workspace >
+inline integer_t steqr( char const compz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ steqr_impl< value_type >::compute( compz, n, d, e, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sterf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sterf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STERF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STERF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sterf( integer_t const n, float* d, float* e,
+ integer_t& info ) {
+ LAPACK_SSTERF( &n, d, e, &info );
+ }
+ inline void sterf( integer_t const n, double* d, double* e,
+ integer_t& info ) {
+ LAPACK_DSTERF( &n, d, e, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sterf_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorD, typename VectorE >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+#endif
+ detail::sterf( n, traits::vector_storage(d),
+ traits::vector_storage(e), info );
+ }
+};
+
+
+// template function to call sterf
+template< typename VectorD, typename VectorE >
+inline integer_t sterf( integer_t const n, VectorD& d, VectorE& e ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ sterf_impl< value_type >::compute( n, d, e, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sycon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sycon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYCON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYCON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sycon( char const uplo, integer_t const n, float* a,
+ integer_t const lda, integer_t* ipiv, float const anorm,
+ float& rcond, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SSYCON( &uplo, &n, a, &lda, ipiv, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void sycon( char const uplo, integer_t const n, double* a,
+ integer_t const lda, integer_t* ipiv, double const anorm,
+ double& rcond, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DSYCON( &uplo, &n, a, &lda, ipiv, &anorm, &rcond, work, iwork,
+ &info );
+ }
+ inline void sycon( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ float const anorm, float& rcond, traits::complex_f* work,
+ integer_t& info ) {
+ LAPACK_CSYCON( &uplo, &n, traits::complex_ptr(a), &lda, ipiv, &anorm,
+ &rcond, traits::complex_ptr(work), &info );
+ }
+ inline void sycon( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ double const anorm, double& rcond, traits::complex_d* work,
+ integer_t& info ) {
+ LAPACK_ZSYCON( &uplo, &n, traits::complex_ptr(a), &lda, ipiv, &anorm,
+ &rcond, traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct sycon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct sycon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK,
+ typename IWORK >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::sycon( uplo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), anorm, rcond,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( uplo, a, ipiv, anorm, rcond, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, a, ipiv, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct sycon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+#endif
+ detail::sycon( uplo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), anorm, rcond,
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( uplo, a, ipiv, anorm, rcond, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ real_type const anorm, real_type& rcond, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, a, ipiv, anorm, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call sycon
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t sycon( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ typename traits::matrix_traits< MatrixA >::value_type const anorm,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sycon_impl< value_type >::compute( uplo, a, ipiv, anorm, rcond, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sygst.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sygst.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,82 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYGST_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYGST_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sygst( integer_t const itype, char const uplo,
+ integer_t const n, float* a, integer_t const lda, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SSYGST( &itype, &uplo, &n, a, &lda, b, &ldb, &info );
+ }
+ inline void sygst( integer_t const itype, char const uplo,
+ integer_t const n, double* a, integer_t const lda, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DSYGST( &itype, &uplo, &n, a, &lda, b, &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sygst_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( integer_t const itype, integer_t const n, MatrixA& a,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::sygst( itype, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call sygst
+template< typename MatrixA, typename MatrixB >
+inline integer_t sygst( integer_t const itype, integer_t const n,
+ MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sygst_impl< value_type >::compute( itype, n, a, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/syrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/syrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,256 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void syrfs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* af,
+ integer_t const ldaf, integer_t* ipiv, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SSYRFS( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void syrfs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* af,
+ integer_t const ldaf, integer_t* ipiv, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DSYRFS( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void syrfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CSYRFS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void syrfs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZSYRFS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct syrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct syrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::syrfs( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( a, af, ipiv, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( a, af, ipiv, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct syrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::syrfs( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( a, af, ipiv, b, x, ferr, berr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( a, af, ipiv, b, x, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call syrfs
+template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t syrfs( MatrixA& a, MatrixAF& af, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ syrfs_impl< value_type >::compute( a, af, ipiv, b, x, ferr, berr,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,123 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYTRD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYTRD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sytrd( char const uplo, integer_t const n, float* a,
+ integer_t const lda, float* d, float* e, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SSYTRD( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info );
+ }
+ inline void sytrd( char const uplo, integer_t const n, double* a,
+ integer_t const lda, double* d, double* e, double* tau,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DSYTRD( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sytrd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(d) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(tau) >= traits::matrix_size2(a)-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::sytrd( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, d, e, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU >
+ static void compute( MatrixA& a, VectorD& d, VectorE& e, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::sytrd( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(d),
+ traits::vector_storage(e), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, d, e, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call sytrd
+template< typename MatrixA, typename VectorD, typename VectorE,
+ typename VectorTAU, typename Workspace >
+inline integer_t sytrd( MatrixA& a, VectorD& d, VectorE& e,
+ VectorTAU& tau, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sytrd_impl< value_type >::compute( a, d, e, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,189 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYTRF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYTRF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sytrf( char const uplo, integer_t const n, float* a,
+ integer_t const lda, integer_t* ipiv, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SSYTRF( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ }
+ inline void sytrf( char const uplo, integer_t const n, double* a,
+ integer_t const lda, integer_t* ipiv, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DSYTRF( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ }
+ inline void sytrf( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CSYTRF( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void sytrf( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZSYTRF( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct sytrf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct sytrf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::sytrf( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::sytrf( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct sytrf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::sytrf( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::sytrf( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call sytrf
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t sytrf( MatrixA& a, VectorIPIV& ipiv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sytrf_impl< value_type >::compute( a, ipiv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,172 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYTRI_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYTRI_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sytri( char const uplo, integer_t const n, float* a,
+ integer_t const lda, integer_t* ipiv, float* work,
+ integer_t& info ) {
+ LAPACK_SSYTRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ }
+ inline void sytri( char const uplo, integer_t const n, double* a,
+ integer_t const lda, integer_t* ipiv, double* work,
+ integer_t& info ) {
+ LAPACK_DSYTRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ }
+ inline void sytri( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_f* work, integer_t& info ) {
+ LAPACK_CSYTRI( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &info );
+ }
+ inline void sytri( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_d* work, integer_t& info ) {
+ LAPACK_ZSYTRI( &uplo, &n, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct sytri_impl{};
+
+// real specialization
+template< typename ValueType >
+struct sytri_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+#endif
+ detail::sytri( uplo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( uplo, a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, optimal_workspace work ) {
+ compute( uplo, a, ipiv, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct sytri_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename WORK >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+#endif
+ detail::sytri( uplo, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv),
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( uplo, a, ipiv, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ integer_t& info, optimal_workspace work ) {
+ compute( uplo, a, ipiv, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call sytri
+template< typename MatrixA, typename VectorIPIV, typename Workspace >
+inline integer_t sytri( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sytri_impl< value_type >::compute( uplo, a, ipiv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,100 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sytrs( char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda,
+ integer_t* ipiv, float* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_SSYTRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ }
+ inline void sytrs( char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda,
+ integer_t* ipiv, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DSYTRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ }
+ inline void sytrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_f* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_CSYTRS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void sytrs( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_d* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_ZSYTRS( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sytrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::sytrs( uplo, traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call sytrs
+template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+inline integer_t sytrs( char const uplo, MatrixA& a, VectorIPIV& ipiv,
+ MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sytrs_impl< value_type >::compute( uplo, a, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbcon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbcon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,207 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TBCON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TBCON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tbcon( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, float* ab,
+ integer_t const ldab, float& rcond, float* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_STBCON( &norm, &uplo, &diag, &n, &kd, ab, &ldab, &rcond, work,
+ iwork, &info );
+ }
+ inline void tbcon( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, double* ab,
+ integer_t const ldab, double& rcond, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DTBCON( &norm, &uplo, &diag, &n, &kd, ab, &ldab, &rcond, work,
+ iwork, &info );
+ }
+ inline void tbcon( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, traits::complex_f* ab,
+ integer_t const ldab, float& rcond, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CTBCON( &norm, &uplo, &diag, &n, &kd, traits::complex_ptr(ab),
+ &ldab, &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void tbcon( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, traits::complex_d* ab,
+ integer_t const ldab, double& rcond, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZTBCON( &norm, &uplo, &diag, &n, &kd, traits::complex_ptr(ab),
+ &ldab, &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tbcon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tbcon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename WORK, typename IWORK >
+ static void compute( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab,
+ real_type& rcond, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::tbcon( norm, uplo, diag, n, kd, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), rcond,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab,
+ real_type& rcond, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( norm, uplo, diag, n, kd, ab, rcond, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab,
+ real_type& rcond, integer_t& info, optimal_workspace work ) {
+ compute( norm, uplo, diag, n, kd, ab, rcond, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tbcon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename WORK, typename RWORK >
+ static void compute( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab,
+ real_type& rcond, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::tbcon( norm, uplo, diag, n, kd, traits::matrix_storage(ab),
+ traits::leading_dimension(ab), rcond,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab,
+ real_type& rcond, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( norm, uplo, diag, n, kd, ab, rcond, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB >
+ static void compute( char const norm, char const uplo, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab,
+ real_type& rcond, integer_t& info, optimal_workspace work ) {
+ compute( norm, uplo, diag, n, kd, ab, rcond, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call tbcon
+template< typename MatrixAB, typename Workspace >
+inline integer_t tbcon( char const norm, char const uplo,
+ char const diag, integer_t const n, integer_t const kd, MatrixAB& ab,
+ typename traits::matrix_traits< MatrixAB >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ tbcon_impl< value_type >::compute( norm, uplo, diag, n, kd, ab,
+ rcond, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,244 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TBRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TBRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tbrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ float* ab, integer_t const ldab, float* b, integer_t const ldb,
+ float* x, integer_t const ldx, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_STBRFS( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b,
+ &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void tbrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ double* ab, integer_t const ldab, double* b, integer_t const ldb,
+ double* x, integer_t const ldx, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DTBRFS( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b,
+ &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void tbrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ traits::complex_f* ab, integer_t const ldab, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CTBRFS( &uplo, &trans, &diag, &n, &kd, &nrhs,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void tbrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ traits::complex_d* ab, integer_t const ldab, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZTBRFS( &uplo, &trans, &diag, &n, &kd, &nrhs,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tbrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tbrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename IWORK >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::tbrfs( uplo, trans, diag, n, kd, traits::matrix_size2(x),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( uplo, trans, diag, n, kd, ab, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, trans, diag, n, kd, ab, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tbrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename RWORK >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::tbrfs( uplo, trans, diag, n, kd, traits::matrix_size2(x),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( uplo, trans, diag, n, kd, ab, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, trans, diag, n, kd, ab, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call tbrfs
+template< typename MatrixAB, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename Workspace >
+inline integer_t tbrfs( char const uplo, char const trans,
+ char const diag, integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ tbrfs_impl< value_type >::compute( uplo, trans, diag, n, kd, ab, b,
+ x, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbtrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbtrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,108 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TBTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TBTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tbtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ float* ab, integer_t const ldab, float* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_STBTRS( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b,
+ &ldb, &info );
+ }
+ inline void tbtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ double* ab, integer_t const ldab, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DTBTRS( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b,
+ &ldb, &info );
+ }
+ inline void tbtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ traits::complex_f* ab, integer_t const ldab, traits::complex_f* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_CTBTRS( &uplo, &trans, &diag, &n, &kd, &nrhs,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(b), &ldb,
+ &info );
+ }
+ inline void tbtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, integer_t const nrhs,
+ traits::complex_d* ab, integer_t const ldab, traits::complex_d* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_ZTBTRS( &uplo, &trans, &diag, &n, &kd, &nrhs,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(b), &ldb,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct tbtrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename MatrixB >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixB& b,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::tbtrs( uplo, trans, diag, n, kd, traits::matrix_size2(b),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call tbtrs
+template< typename MatrixAB, typename MatrixB >
+inline integer_t tbtrs( char const uplo, char const trans,
+ char const diag, integer_t const n, integer_t const kd, MatrixAB& ab,
+ MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ tbtrs_impl< value_type >::compute( uplo, trans, diag, n, kd, ab, b,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,227 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TGEVC_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TGEVC_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tgevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, float* s, integer_t const lds, float* p,
+ integer_t const ldp, float* vl, integer_t const ldvl, float* vr,
+ integer_t const ldvr, integer_t const mm, integer_t& m,
+ float* work, integer_t& info ) {
+ LAPACK_STGEVC( &side, &howmny, select, &n, s, &lds, p, &ldp, vl,
+ &ldvl, vr, &ldvr, &mm, &m, work, &info );
+ }
+ inline void tgevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, double* s, integer_t const lds, double* p,
+ integer_t const ldp, double* vl, integer_t const ldvl, double* vr,
+ integer_t const ldvr, integer_t const mm, integer_t& m,
+ double* work, integer_t& info ) {
+ LAPACK_DTGEVC( &side, &howmny, select, &n, s, &lds, p, &ldp, vl,
+ &ldvl, vr, &ldvr, &mm, &m, work, &info );
+ }
+ inline void tgevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_f* s, integer_t const lds,
+ traits::complex_f* p, integer_t const ldp, traits::complex_f* vl,
+ integer_t const ldvl, traits::complex_f* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CTGEVC( &side, &howmny, select, &n, traits::complex_ptr(s),
+ &lds, traits::complex_ptr(p), &ldp, traits::complex_ptr(vl),
+ &ldvl, traits::complex_ptr(vr), &ldvr, &mm, &m,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void tgevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_d* s, integer_t const lds,
+ traits::complex_d* p, integer_t const ldp, traits::complex_d* vl,
+ integer_t const ldvl, traits::complex_d* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZTGEVC( &side, &howmny, select, &n, traits::complex_ptr(s),
+ &lds, traits::complex_ptr(p), &ldp, traits::complex_ptr(vl),
+ &ldvl, traits::complex_ptr(vr), &ldvr, &mm, &m,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tgevc_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tgevc_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR, typename WORK >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'R' || side == 'L' || side == 'B' );
+ assert( howmny == 'A' || howmny == 'B' || howmny == 'S' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(s) >= std::max(1,n) );
+ assert( traits::leading_dimension(p) >= std::max(1,n) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::tgevc( side, howmny, traits::vector_storage(select), n,
+ traits::matrix_storage(s), traits::leading_dimension(s),
+ traits::matrix_storage(p), traits::leading_dimension(p),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr), mm,
+ m, traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( side, howmny, select, n, s, p, vl, vr, mm, m, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ integer_t& info, optimal_workspace work ) {
+ compute( side, howmny, select, n, s, p, vl, vr, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 6*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tgevc_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR, typename WORK,
+ typename RWORK >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'R' || side == 'L' || side == 'B' );
+ assert( howmny == 'A' || howmny == 'B' || howmny == 'S' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(s) >= std::max(1,n) );
+ assert( traits::leading_dimension(p) >= std::max(1,n) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::tgevc( side, howmny, traits::vector_storage(select), n,
+ traits::matrix_storage(s), traits::leading_dimension(s),
+ traits::matrix_storage(p), traits::leading_dimension(p),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr), mm,
+ m, traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( side, howmny, select, n, s, p, vl, vr, mm, m, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ integer_t& info, optimal_workspace work ) {
+ compute( side, howmny, select, n, s, p, vl, vr, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call tgevc
+template< typename VectorSELECT, typename MatrixS, typename MatrixP,
+ typename MatrixVL, typename MatrixVR, typename Workspace >
+inline integer_t tgevc( char const side, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
+ MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ tgevc_impl< value_type >::compute( side, howmny, select, n, s, p, vl,
+ vr, mm, m, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgexc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgexc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,189 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TGEXC_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TGEXC_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tgexc( logical_t const wantq, logical_t const wantz,
+ integer_t const n, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* q, integer_t const ldq, float* z,
+ integer_t const ldz, integer_t& ifst, integer_t& ilst,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_STGEXC( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
+ &ifst, &ilst, work, &lwork, &info );
+ }
+ inline void tgexc( logical_t const wantq, logical_t const wantz,
+ integer_t const n, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* q, integer_t const ldq, double* z,
+ integer_t const ldz, integer_t& ifst, integer_t& ilst,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DTGEXC( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
+ &ifst, &ilst, work, &lwork, &info );
+ }
+ inline void tgexc( logical_t const wantq, logical_t const wantz,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* q,
+ integer_t const ldq, traits::complex_f* z, integer_t const ldz,
+ integer_t const ifst, integer_t& ilst, integer_t& info ) {
+ LAPACK_CTGEXC( &wantq, &wantz, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(z), &ldz, &ifst, &ilst, &info );
+ }
+ inline void tgexc( logical_t const wantq, logical_t const wantz,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* q,
+ integer_t const ldq, traits::complex_d* z, integer_t const ldz,
+ integer_t const ifst, integer_t& ilst, integer_t& info ) {
+ LAPACK_ZTGEXC( &wantq, &wantz, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(z), &ldz, &ifst, &ilst, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tgexc_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tgexc_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ >
+ static void compute( logical_t const wantq, logical_t const wantz,
+ integer_t const n, MatrixA& a, MatrixB& b, MatrixQ& q, MatrixZ& z,
+ integer_t& ifst, integer_t& ilst, integer_t& info ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::tgexc( wantq, wantz, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::matrix_storage(z),
+ traits::leading_dimension(z), ifst, ilst,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tgexc_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ, $WORKSPACE_TYPENAMES >
+ static void compute( logical_t const wantq, logical_t const wantz,
+ integer_t const n, MatrixA& a, MatrixB& b, MatrixQ& q, MatrixZ& z,
+ integer_t const ifst, integer_t& ilst, integer_t& info,
+ detail::workspace$WORKSPACE_SIZE< $WORKSPACE_TYPES > work ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::tgexc( wantq, wantz, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::matrix_storage(z),
+ traits::leading_dimension(z), ifst, ilst, info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ >
+ static void compute( logical_t const wantq, logical_t const wantz,
+ integer_t const n, MatrixA& a, MatrixB& b, MatrixQ& q, MatrixZ& z,
+ integer_t const ifst, integer_t& ilst, integer_t& info,
+ minimal_workspace work ) {
+$SETUP_MIN_WORKARRAYS_POST
+ compute( wantq, wantz, n, a, b, q, z, ifst, ilst, info,
+ workspace( $TMP_WORKARRAYS ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ >
+ static void compute( logical_t const wantq, logical_t const wantz,
+ integer_t const n, MatrixA& a, MatrixB& b, MatrixQ& q, MatrixZ& z,
+ integer_t const ifst, integer_t& ilst, integer_t& info,
+ optimal_workspace work ) {
+$OPT_WORKSPACE_FUNC
+ }
+
+$MIN_SIZE_FUNCS
+};
+
+
+// template function to call tgexc
+template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ >
+inline integer_t tgexc( logical_t const wantq, logical_t const wantz,
+ integer_t const n, MatrixA& a, MatrixB& b, MatrixQ& q, MatrixZ& z,
+ integer_t& ifst, integer_t& ilst ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ tgexc_impl< value_type >::compute( wantq, wantz, n, a, b, q, z, ifst,
+ ilst, info );
+ return info;
+}
+
+// template function to call tgexc
+template< typename MatrixA, typename MatrixB, typename MatrixQ,
+ typename MatrixZ, typename Workspace >
+inline integer_t tgexc( logical_t const wantq, logical_t const wantz,
+ integer_t const n, MatrixA& a, MatrixB& b, MatrixQ& q, MatrixZ& z,
+ integer_t const ifst, integer_t& ilst,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ tgexc_impl< value_type >::compute( wantq, wantz, n, a, b, q, z, ifst,
+ ilst, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,336 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TGSEN_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TGSEN_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tgsen( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, logical_t* select, integer_t const n,
+ float* a, integer_t const lda, float* b, integer_t const ldb,
+ float* alphar, float* alphai, float* beta, float* q,
+ integer_t const ldq, float* z, integer_t const ldz, integer_t& m,
+ float& pl, float& pr, float* dif, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void tgsen( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, logical_t* select, integer_t const n,
+ double* a, integer_t const lda, double* b, integer_t const ldb,
+ double* alphar, double* alphai, double* beta, double* q,
+ integer_t const ldq, double* z, integer_t const ldz, integer_t& m,
+ double& pl, double& pr, double* dif, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void tgsen( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, logical_t* select, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* alpha,
+ traits::complex_f* beta, traits::complex_f* q,
+ integer_t const ldq, traits::complex_f* z, integer_t const ldz,
+ integer_t& m, float& pl, float& pr, float* dif,
+ traits::complex_f* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, integer_t& info ) {
+ LAPACK_CTGSEN( &ijob, &wantq, &wantz, select, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(q), &ldq, traits::complex_ptr(z), &ldz,
+ &m, &pl, &pr, dif, traits::complex_ptr(work), &lwork, iwork,
+ &liwork, &info );
+ }
+ inline void tgsen( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, logical_t* select, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* alpha,
+ traits::complex_d* beta, traits::complex_d* q,
+ integer_t const ldq, traits::complex_d* z, integer_t const ldz,
+ integer_t& m, double& pl, double& pr, double* dif,
+ traits::complex_d* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, integer_t& info ) {
+ LAPACK_ZTGSEN( &ijob, &wantq, &wantz, select, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(q), &ldq, traits::complex_ptr(z), &ldz,
+ &m, &pl, &pr, dif, traits::complex_ptr(work), &lwork, iwork,
+ &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tgsen_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tgsen_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHAR, typename VectorALPHAI, typename VectorBETA,
+ typename MatrixQ, typename MatrixZ, typename VectorDIF,
+ typename WORK, typename IWORK >
+ static void compute( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ integer_t& m, real_type& pl, real_type& pr, VectorDIF& dif,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::vector_size(select) >= n );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(alphar) >= n );
+ assert( traits::vector_size(alphai) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( $CALL_MIN_SIZE )));
+#endif
+ detail::tgsen( ijob, wantq, wantz, traits::vector_storage(select), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(z), traits::leading_dimension(z), m,
+ pl, pr, traits::vector_storage(dif),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHAR, typename VectorALPHAI, typename VectorBETA,
+ typename MatrixQ, typename MatrixZ, typename VectorDIF >
+ static void compute( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ integer_t& m, real_type& pl, real_type& pr, VectorDIF& dif,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ compute( ijob, wantq, wantz, select, n, a, b, alphar, alphai, beta, q,
+ z, m, pl, pr, dif, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHAR, typename VectorALPHAI, typename VectorBETA,
+ typename MatrixQ, typename MatrixZ, typename VectorDIF >
+ static void compute( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixQ& q, MatrixZ& z,
+ integer_t& m, real_type& pl, real_type& pr, VectorDIF& dif,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::tgsen( ijob, wantq, wantz,
+ traits::vector_storage(select), n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(z), traits::leading_dimension(z), m,
+ pl, pr, traits::vector_storage(dif), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( ijob, wantq, wantz, select, n, a, b, alphar, alphai, beta, q,
+ z, m, pl, pr, dif, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tgsen_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHA, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ, typename VectorDIF, typename WORK,
+ typename IWORK >
+ static void compute( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixQ& q, MatrixZ& z, integer_t& m, real_type& pl,
+ real_type& pr, VectorDIF& dif, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::vector_size(select) >= n );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(alpha) >= n );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( $CALL_MIN_SIZE )));
+#endif
+ detail::tgsen( ijob, wantq, wantz, traits::vector_storage(select), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::matrix_storage(z), traits::leading_dimension(z), m,
+ pl, pr, traits::vector_storage(dif),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHA, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ, typename VectorDIF >
+ static void compute( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixQ& q, MatrixZ& z, integer_t& m, real_type& pl,
+ real_type& pr, VectorDIF& dif, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ compute( ijob, wantq, wantz, select, n, a, b, alpha, beta, q, z, m,
+ pl, pr, dif, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHA, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ, typename VectorDIF >
+ static void compute( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixQ& q, MatrixZ& z, integer_t& m, real_type& pl,
+ real_type& pr, VectorDIF& dif, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::tgsen( ijob, wantq, wantz,
+ traits::vector_storage(select), n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(alpha),
+ traits::vector_storage(beta), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::matrix_storage(z),
+ traits::leading_dimension(z), m, pl, pr,
+ traits::vector_storage(dif), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( ijob, wantq, wantz, select, n, a, b, alpha, beta, q, z, m,
+ pl, pr, dif, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call tgsen
+template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHAR, typename VectorALPHAI, typename VectorBETA,
+ typename MatrixQ, typename MatrixZ, typename VectorDIF,
+ typename Workspace >
+inline integer_t tgsen( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixQ& q, MatrixZ& z, integer_t& m,
+ typename traits::vector_traits< VectorSELECT >::value_type& pl,
+ typename traits::vector_traits< VectorSELECT >::value_type& pr,
+ VectorDIF& dif, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ tgsen_impl< value_type >::compute( ijob, wantq, wantz, select, n, a,
+ b, alphar, alphai, beta, q, z, m, pl, pr, dif, info, work );
+ return info;
+}
+
+// template function to call tgsen
+template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename VectorALPHA, typename VectorBETA, typename MatrixQ,
+ typename MatrixZ, typename VectorDIF, typename Workspace >
+inline integer_t tgsen( integer_t const ijob, logical_t const wantq,
+ logical_t const wantz, VectorSELECT& select, integer_t const n,
+ MatrixA& a, MatrixB& b, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixQ& q, MatrixZ& z, integer_t& m,
+ typename traits::vector_traits< VectorSELECT >::value_type& pl,
+ typename traits::vector_traits< VectorSELECT >::value_type& pr,
+ VectorDIF& dif, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ tgsen_impl< value_type >::compute( ijob, wantq, wantz, select, n, a,
+ b, alpha, beta, q, z, m, pl, pr, dif, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsja.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsja.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,272 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TGSJA_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TGSJA_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tgsja( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ integer_t const k, integer_t const l, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ float const tola, float const tolb, float* alpha, float* beta,
+ float* u, integer_t const ldu, float* v, integer_t const ldv,
+ float* q, integer_t const ldq, float* work, integer_t& ncycle,
+ integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void tgsja( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ integer_t const k, integer_t const l, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ double const tola, double const tolb, double* alpha, double* beta,
+ double* u, integer_t const ldu, double* v, integer_t const ldv,
+ double* q, integer_t const ldq, double* work, integer_t& ncycle,
+ integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void tgsja( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ integer_t const k, integer_t const l, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ float const tola, float const tolb, float* alpha, float* beta,
+ traits::complex_f* u, integer_t const ldu, traits::complex_f* v,
+ integer_t const ldv, traits::complex_f* q, integer_t const ldq,
+ traits::complex_f* work, integer_t& ncycle, integer_t& info ) {
+ LAPACK_CTGSJA( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &tola, &tolb, alpha, beta, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(v), &ldv, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(work), &ncycle, &info );
+ }
+ inline void tgsja( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const p, integer_t const n,
+ integer_t const k, integer_t const l, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ double const tola, double const tolb, double* alpha, double* beta,
+ traits::complex_d* u, integer_t const ldu, traits::complex_d* v,
+ integer_t const ldv, traits::complex_d* q, integer_t const ldq,
+ traits::complex_d* work, integer_t& ncycle, integer_t& info ) {
+ LAPACK_ZTGSJA( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &tola, &tolb, alpha, beta, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(v), &ldv, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(work), &ncycle, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tgsja_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tgsja_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ, typename WORK >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t const k, integer_t const l, MatrixA& a, MatrixB& b,
+ real_type const tola, real_type const tolb, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
+ integer_t& ncycle, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'U' || jobu == 'I' || jobu == 'N' );
+ assert( jobv == 'V' || jobv == 'I' || jobv == 'N' );
+ assert( jobq == 'Q' || jobq == 'I' || jobq == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(b) )));
+#endif
+ detail::tgsja( jobu, jobv, jobq, traits::matrix_size1(a),
+ traits::matrix_size1(b), traits::matrix_size2(b), k, l,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), tola,
+ tolb, traits::vector_storage(alpha),
+ traits::vector_storage(beta), traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(v),
+ traits::leading_dimension(v), traits::matrix_storage(q),
+ traits::leading_dimension(q),
+ traits::vector_storage(work.select(real_type())), ncycle,
+ info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t const k, integer_t const l, MatrixA& a, MatrixB& b,
+ real_type const tola, real_type const tolb, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
+ integer_t& ncycle, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(b) ) );
+ compute( jobu, jobv, jobq, k, l, a, b, tola, tolb, alpha, beta, u, v,
+ q, ncycle, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t const k, integer_t const l, MatrixA& a, MatrixB& b,
+ real_type const tola, real_type const tolb, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
+ integer_t& ncycle, integer_t& info, optimal_workspace work ) {
+ compute( jobu, jobv, jobq, k, l, a, b, tola, tolb, alpha, beta, u, v,
+ q, ncycle, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tgsja_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ, typename WORK >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t const k, integer_t const l, MatrixA& a, MatrixB& b,
+ real_type const tola, real_type const tolb, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
+ integer_t& ncycle, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'U' || jobu == 'I' || jobu == 'N' );
+ assert( jobv == 'V' || jobv == 'I' || jobv == 'N' );
+ assert( jobq == 'Q' || jobq == 'I' || jobq == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(b) )));
+#endif
+ detail::tgsja( jobu, jobv, jobq, traits::matrix_size1(a),
+ traits::matrix_size1(b), traits::matrix_size2(b), k, l,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), tola,
+ tolb, traits::vector_storage(alpha),
+ traits::vector_storage(beta), traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(v),
+ traits::leading_dimension(v), traits::matrix_storage(q),
+ traits::leading_dimension(q),
+ traits::vector_storage(work.select(value_type())), ncycle,
+ info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t const k, integer_t const l, MatrixA& a, MatrixB& b,
+ real_type const tola, real_type const tolb, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
+ integer_t& ncycle, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(b) ) );
+ compute( jobu, jobv, jobq, k, l, a, b, tola, tolb, alpha, beta, u, v,
+ q, ncycle, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t const k, integer_t const l, MatrixA& a, MatrixB& b,
+ real_type const tola, real_type const tolb, VectorALPHA& alpha,
+ VectorBETA& beta, MatrixU& u, MatrixV& v, MatrixQ& q,
+ integer_t& ncycle, integer_t& info, optimal_workspace work ) {
+ compute( jobu, jobv, jobq, k, l, a, b, tola, tolb, alpha, beta, u, v,
+ q, ncycle, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call tgsja
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ, typename Workspace >
+inline integer_t tgsja( char const jobu, char const jobv,
+ char const jobq, integer_t const k, integer_t const l, MatrixA& a,
+ MatrixB& b,
+ typename traits::matrix_traits< MatrixA >::value_type const tola,
+ typename traits::matrix_traits< MatrixA >::value_type const tolb,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& ncycle, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ tgsja_impl< value_type >::compute( jobu, jobv, jobq, k, l, a, b,
+ tola, tolb, alpha, beta, u, v, q, ncycle, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,273 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TGSNA_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TGSNA_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tgsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* vl, integer_t const ldvl, float* vr,
+ integer_t const ldvr, float* s, float* dif, integer_t const mm,
+ integer_t& m, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_STGSNA( &job, &howmny, select, &n, a, &lda, b, &ldb, vl, &ldvl,
+ vr, &ldvr, s, dif, &mm, &m, work, &lwork, iwork, &info );
+ }
+ inline void tgsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* vl, integer_t const ldvl, double* vr,
+ integer_t const ldvr, double* s, double* dif, integer_t const mm,
+ integer_t& m, double* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DTGSNA( &job, &howmny, select, &n, a, &lda, b, &ldb, vl, &ldvl,
+ vr, &ldvr, s, dif, &mm, &m, work, &lwork, iwork, &info );
+ }
+ inline void tgsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* vl,
+ integer_t const ldvl, traits::complex_f* vr, integer_t const ldvr,
+ float* s, float* dif, integer_t const mm, integer_t& m,
+ traits::complex_f* work, integer_t const lwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_CTGSNA( &job, &howmny, select, &n, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(vl),
+ &ldvl, traits::complex_ptr(vr), &ldvr, s, dif, &mm, &m,
+ traits::complex_ptr(work), &lwork, iwork, &info );
+ }
+ inline void tgsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* vl,
+ integer_t const ldvl, traits::complex_d* vr, integer_t const ldvr,
+ double* s, double* dif, integer_t const mm, integer_t& m,
+ traits::complex_d* work, integer_t const lwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_ZTGSNA( &job, &howmny, select, &n, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(vl),
+ &ldvl, traits::complex_ptr(vr), &ldvr, s, dif, &mm, &m,
+ traits::complex_ptr(work), &lwork, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tgsna_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tgsna_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF, typename WORK, typename IWORK >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'V' || job == 'B' );
+ assert( howmny == 'A' || howmny == 'S' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( $CALL_MIN_SIZE )));
+#endif
+ detail::tgsna( job, howmny, traits::vector_storage(select), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(s), traits::vector_storage(dif), mm, m,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ compute( job, howmny, select, n, a, b, vl, vr, s, dif, mm, m, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ detail::tgsna( job, howmny, traits::vector_storage(select), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(s), traits::vector_storage(dif), mm, m,
+ &opt_size_work, -1, traits::vector_storage(tmp_iwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( job, howmny, select, n, a, b, vl, vr, s, dif, mm, m, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tgsna_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF, typename WORK, typename IWORK >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'V' || job == 'B' );
+ assert( howmny == 'A' || howmny == 'S' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( $CALL_MIN_SIZE )));
+#endif
+ detail::tgsna( job, howmny, traits::vector_storage(select), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(s), traits::vector_storage(dif), mm, m,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ compute( job, howmny, select, n, a, b, vl, vr, s, dif, mm, m, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m, integer_t& info,
+ optimal_workspace work ) {
+ compute( job, howmny, select, n, a, b, vl, vr, s, dif, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call tgsna
+template< typename VectorSELECT, typename MatrixA, typename MatrixB,
+ typename MatrixVL, typename MatrixVR, typename VectorS,
+ typename VectorDIF, typename Workspace >
+inline integer_t tgsna( char const job, char const howmny,
+ VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
+ integer_t const mm, integer_t& m,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ tgsna_impl< value_type >::compute( job, howmny, select, n, a, b, vl,
+ vr, s, dif, mm, m, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,276 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TGSYL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TGSYL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tgsyl( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb, float* c,
+ integer_t const ldc, float* d, integer_t const ldd, float* e,
+ integer_t const lde, float* f, integer_t const ldf, float& scale,
+ float& dif, float* work, integer_t const lwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_STGSYL( &trans, &ijob, &m, &n, a, &lda, b, &ldb, c, &ldc, d,
+ &ldd, e, &lde, f, &ldf, &scale, &dif, work, &lwork, iwork,
+ &info );
+ }
+ inline void tgsyl( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb, double* c,
+ integer_t const ldc, double* d, integer_t const ldd, double* e,
+ integer_t const lde, double* f, integer_t const ldf,
+ double& scale, double& dif, double* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DTGSYL( &trans, &ijob, &m, &n, a, &lda, b, &ldb, c, &ldc, d,
+ &ldd, e, &lde, f, &ldf, &scale, &dif, work, &lwork, iwork,
+ &info );
+ }
+ inline void tgsyl( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* c, integer_t const ldc, traits::complex_f* d,
+ integer_t const ldd, traits::complex_f* e, integer_t const lde,
+ traits::complex_f* f, integer_t const ldf, float& scale,
+ float& dif, traits::complex_f* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_CTGSYL( &trans, &ijob, &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(d), &ldd, traits::complex_ptr(e), &lde,
+ traits::complex_ptr(f), &ldf, &scale, &dif,
+ traits::complex_ptr(work), &lwork, iwork, &info );
+ }
+ inline void tgsyl( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* c, integer_t const ldc, traits::complex_d* d,
+ integer_t const ldd, traits::complex_d* e, integer_t const lde,
+ traits::complex_d* f, integer_t const ldf, double& scale,
+ double& dif, traits::complex_d* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_ZTGSYL( &trans, &ijob, &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(d), &ldd, traits::complex_ptr(e), &lde,
+ traits::complex_ptr(f), &ldf, &scale, &dif,
+ traits::complex_ptr(work), &lwork, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tgsyl_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tgsyl_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF,
+ typename WORK, typename IWORK >
+ static void compute( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f, real_type& scale,
+ real_type& dif, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( m, n )));
+#endif
+ detail::tgsyl( trans, ijob, m, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(c),
+ traits::leading_dimension(c), traits::matrix_storage(d),
+ traits::leading_dimension(d), traits::matrix_storage(e),
+ traits::leading_dimension(e), traits::matrix_storage(f),
+ traits::leading_dimension(f), scale, dif,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF >
+ static void compute( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f, real_type& scale,
+ real_type& dif, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( m, n ) );
+ compute( trans, ijob, m, n, a, b, c, d, e, f, scale, dif, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF >
+ static void compute( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f, real_type& scale,
+ real_type& dif, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( m, n ) );
+ detail::tgsyl( trans, ijob, m, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(c),
+ traits::leading_dimension(c), traits::matrix_storage(d),
+ traits::leading_dimension(d), traits::matrix_storage(e),
+ traits::leading_dimension(e), traits::matrix_storage(f),
+ traits::leading_dimension(f), scale, dif, &opt_size_work, -1,
+ traits::vector_storage(tmp_iwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( trans, ijob, m, n, a, b, c, d, e, f, scale, dif, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( integer_t const m, integer_t const n ) {
+ return m+n+6;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tgsyl_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF,
+ typename WORK, typename IWORK >
+ static void compute( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f, real_type& scale,
+ real_type& dif, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( m, n )));
+#endif
+ detail::tgsyl( trans, ijob, m, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(c),
+ traits::leading_dimension(c), traits::matrix_storage(d),
+ traits::leading_dimension(d), traits::matrix_storage(e),
+ traits::leading_dimension(e), traits::matrix_storage(f),
+ traits::leading_dimension(f), scale, dif,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF >
+ static void compute( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f, real_type& scale,
+ real_type& dif, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( m, n ) );
+ compute( trans, ijob, m, n, a, b, c, d, e, f, scale, dif, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF >
+ static void compute( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f, real_type& scale,
+ real_type& dif, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( m, n ) );
+ detail::tgsyl( trans, ijob, m, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(c),
+ traits::leading_dimension(c), traits::matrix_storage(d),
+ traits::leading_dimension(d), traits::matrix_storage(e),
+ traits::leading_dimension(e), traits::matrix_storage(f),
+ traits::leading_dimension(f), scale, dif, &opt_size_work, -1,
+ traits::vector_storage(tmp_iwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( trans, ijob, m, n, a, b, c, d, e, f, scale, dif, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( integer_t const m, integer_t const n ) {
+ return m+n+2;
+ }
+};
+
+
+// template function to call tgsyl
+template< typename MatrixA, typename MatrixB, typename MatrixC,
+ typename MatrixD, typename MatrixE, typename MatrixF,
+ typename Workspace >
+inline integer_t tgsyl( char const trans, integer_t const ijob,
+ integer_t const m, integer_t const n, MatrixA& a, MatrixB& b,
+ MatrixC& c, MatrixD& d, MatrixE& e, MatrixF& f,
+ typename traits::matrix_traits< MatrixA >::value_type& scale,
+ typename traits::matrix_traits< MatrixA >::value_type& dif,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ tgsyl_impl< value_type >::compute( trans, ijob, m, n, a, b, c, d, e,
+ f, scale, dif, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,236 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TPRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TPRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tprfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, float* ap, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_STPRFS( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ }
+ inline void tprfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, double* ap, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DTPRFS( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ }
+ inline void tprfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CTPRFS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(ap), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void tprfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZTPRFS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(ap), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tprfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tprfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename IWORK >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::tprfs( uplo, trans, diag, n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( uplo, trans, diag, n, ap, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, trans, diag, n, ap, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tprfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename RWORK >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::tprfs( uplo, trans, diag, n, traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( uplo, trans, diag, n, ap, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, trans, diag, n, ap, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call tprfs
+template< typename MatrixAP, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename Workspace >
+inline integer_t tprfs( char const uplo, char const trans,
+ char const diag, integer_t const n, MatrixAP& ap, MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ tprfs_impl< value_type >::compute( uplo, trans, diag, n, ap, b, x,
+ ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TPTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TPTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tptrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, float* ap, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_STPTRS( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info );
+ }
+ inline void tptrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, double* ap, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DTPTRS( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info );
+ }
+ inline void tptrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CTPTRS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(ap), traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void tptrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZTPTRS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(ap), traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct tptrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename MatrixB >
+ static void compute( char const uplo, char const trans, char const diag,
+ integer_t const n, MatrixAP& ap, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::tptrs( uplo, trans, diag, n, traits::matrix_size2(b),
+ traits::matrix_storage(ap), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call tptrs
+template< typename MatrixAP, typename MatrixB >
+inline integer_t tptrs( char const uplo, char const trans,
+ char const diag, integer_t const n, MatrixAP& ap, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ tptrs_impl< value_type >::compute( uplo, trans, diag, n, ap, b,
+ info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trcon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trcon.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,205 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRCON_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRCON_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trcon( char const norm, char const uplo, char const diag,
+ integer_t const n, float* a, integer_t const lda, float& rcond,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_STRCON( &norm, &uplo, &diag, &n, a, &lda, &rcond, work, iwork,
+ &info );
+ }
+ inline void trcon( char const norm, char const uplo, char const diag,
+ integer_t const n, double* a, integer_t const lda, double& rcond,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DTRCON( &norm, &uplo, &diag, &n, a, &lda, &rcond, work, iwork,
+ &info );
+ }
+ inline void trcon( char const norm, char const uplo, char const diag,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ float& rcond, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CTRCON( &norm, &uplo, &diag, &n, traits::complex_ptr(a), &lda,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void trcon( char const norm, char const uplo, char const diag,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ double& rcond, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZTRCON( &norm, &uplo, &diag, &n, traits::complex_ptr(a), &lda,
+ &rcond, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct trcon_impl{};
+
+// real specialization
+template< typename ValueType >
+struct trcon_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename WORK, typename IWORK >
+ static void compute( char const norm, char const uplo, char const diag,
+ MatrixA& a, real_type& rcond, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::trcon( norm, uplo, diag, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ rcond, traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, char const uplo, char const diag,
+ MatrixA& a, real_type& rcond, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( norm, uplo, diag, a, rcond, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, char const uplo, char const diag,
+ MatrixA& a, real_type& rcond, integer_t& info,
+ optimal_workspace work ) {
+ compute( norm, uplo, diag, a, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct trcon_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename WORK, typename RWORK >
+ static void compute( char const norm, char const uplo, char const diag,
+ MatrixA& a, real_type& rcond, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( norm == '1' || norm == 'O' || norm == 'I' );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::trcon( norm, uplo, diag, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ rcond, traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, char const uplo, char const diag,
+ MatrixA& a, real_type& rcond, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( norm, uplo, diag, a, rcond, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA >
+ static void compute( char const norm, char const uplo, char const diag,
+ MatrixA& a, real_type& rcond, integer_t& info,
+ optimal_workspace work ) {
+ compute( norm, uplo, diag, a, rcond, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call trcon
+template< typename MatrixA, typename Workspace >
+inline integer_t trcon( char const norm, char const uplo,
+ char const diag, MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ trcon_impl< value_type >::compute( norm, uplo, diag, a, rcond, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,225 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TREVC_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TREVC_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, float* t, integer_t const ldt, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, float* work, integer_t& info ) {
+ LAPACK_STREVC( &side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, &mm, &m, work, &info );
+ }
+ inline void trevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, double* t, integer_t const ldt, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr,
+ integer_t const mm, integer_t& m, double* work, integer_t& info ) {
+ LAPACK_DTREVC( &side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, &mm, &m, work, &info );
+ }
+ inline void trevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_f* t, integer_t const ldt,
+ traits::complex_f* vl, integer_t const ldvl,
+ traits::complex_f* vr, integer_t const ldvr, integer_t const mm,
+ integer_t& m, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CTREVC( &side, &howmny, select, &n, traits::complex_ptr(t),
+ &ldt, traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &mm, &m, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void trevc( char const side, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_d* t, integer_t const ldt,
+ traits::complex_d* vl, integer_t const ldvl,
+ traits::complex_d* vr, integer_t const ldvr, integer_t const mm,
+ integer_t& m, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZTREVC( &side, &howmny, select, &n, traits::complex_ptr(t),
+ &ldt, traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &mm, &m, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct trevc_impl{};
+
+// real specialization
+template< typename ValueType >
+struct trevc_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename WORK >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'R' || side == 'L' || side == 'B' );
+ assert( howmny == 'A' || howmny == 'B' || howmny == 'S' );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(t) )));
+#endif
+ detail::trevc( side, howmny, traits::vector_storage(select),
+ traits::matrix_size2(t), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), mm, m,
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(t) ) );
+ compute( side, howmny, select, t, vl, vr, mm, m, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m, integer_t& info,
+ optimal_workspace work ) {
+ compute( side, howmny, select, t, vl, vr, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct trevc_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename WORK, typename RWORK >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'R' || side == 'L' || side == 'B' );
+ assert( howmny == 'A' || howmny == 'B' || howmny == 'S' );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(t) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(t) )));
+#endif
+ detail::trevc( side, howmny, traits::vector_storage(select),
+ traits::matrix_size2(t), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), mm, m,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(t) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(t) ) );
+ compute( side, howmny, select, t, vl, vr, mm, m, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m, integer_t& info,
+ optimal_workspace work ) {
+ compute( side, howmny, select, t, vl, vr, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call trevc
+template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename Workspace >
+inline integer_t trevc( char const side, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ integer_t const mm, integer_t& m,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ trevc_impl< value_type >::compute( side, howmny, select, t, vl, vr,
+ mm, m, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trexc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trexc.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,168 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TREXC_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TREXC_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trexc( char const compq, integer_t const n, float* t,
+ integer_t const ldt, float* q, integer_t const ldq,
+ integer_t& ifst, integer_t& ilst, float* work, integer_t& info ) {
+ LAPACK_STREXC( &compq, &n, t, &ldt, q, &ldq, &ifst, &ilst, work,
+ &info );
+ }
+ inline void trexc( char const compq, integer_t const n, double* t,
+ integer_t const ldt, double* q, integer_t const ldq,
+ integer_t& ifst, integer_t& ilst, double* work, integer_t& info ) {
+ LAPACK_DTREXC( &compq, &n, t, &ldt, q, &ldq, &ifst, &ilst, work,
+ &info );
+ }
+ inline void trexc( char const compq, integer_t const n,
+ traits::complex_f* t, integer_t const ldt, traits::complex_f* q,
+ integer_t const ldq, integer_t const ifst, integer_t const ilst,
+ integer_t& info ) {
+ LAPACK_CTREXC( &compq, &n, traits::complex_ptr(t), &ldt,
+ traits::complex_ptr(q), &ldq, &ifst, &ilst, &info );
+ }
+ inline void trexc( char const compq, integer_t const n,
+ traits::complex_d* t, integer_t const ldt, traits::complex_d* q,
+ integer_t const ldq, integer_t const ifst, integer_t const ilst,
+ integer_t& info ) {
+ LAPACK_ZTREXC( &compq, &n, traits::complex_ptr(t), &ldt,
+ traits::complex_ptr(q), &ldq, &ifst, &ilst, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct trexc_impl{};
+
+// real specialization
+template< typename ValueType >
+struct trexc_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixT, typename MatrixQ >
+ static void compute( char const compq, MatrixT& t, MatrixQ& q,
+ integer_t& ifst, integer_t& ilst, integer_t& info ) {
+#ifndef NDEBUG
+ assert( compq == 'V' || compq == 'N' );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( traits::leading_dimension(q) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(t) )));
+#endif
+ detail::trexc( compq, traits::matrix_size2(t),
+ traits::matrix_storage(t), traits::leading_dimension(t),
+ traits::matrix_storage(q), traits::leading_dimension(q), ifst,
+ ilst, traits::vector_storage(work.select(real_type())), info );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct trexc_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixT, typename MatrixQ, $WORKSPACE_TYPENAMES >
+ static void compute( char const compq, MatrixT& t, MatrixQ& q,
+ integer_t const ifst, integer_t const ilst, integer_t& info,
+ detail::workspace$WORKSPACE_SIZE< $WORKSPACE_TYPES > work ) {
+#ifndef NDEBUG
+ assert( compq == 'V' || compq == 'N' );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( traits::leading_dimension(q) >= std::max(1,
+ traits::matrix_size2(t)) );
+#endif
+ detail::trexc( compq, traits::matrix_size2(t),
+ traits::matrix_storage(t), traits::leading_dimension(t),
+ traits::matrix_storage(q), traits::leading_dimension(q), ifst,
+ ilst, info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixT, typename MatrixQ >
+ static void compute( char const compq, MatrixT& t, MatrixQ& q,
+ integer_t const ifst, integer_t const ilst, integer_t& info,
+ minimal_workspace work ) {
+$SETUP_MIN_WORKARRAYS_POST
+ compute( compq, t, q, ifst, ilst, info, workspace( $TMP_WORKARRAYS ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixT, typename MatrixQ >
+ static void compute( char const compq, MatrixT& t, MatrixQ& q,
+ integer_t const ifst, integer_t const ilst, integer_t& info,
+ optimal_workspace work ) {
+$OPT_WORKSPACE_FUNC
+ }
+
+$MIN_SIZE_FUNCS
+};
+
+
+// template function to call trexc
+template< typename MatrixT, typename MatrixQ >
+inline integer_t trexc( char const compq, MatrixT& t, MatrixQ& q,
+ integer_t& ifst, integer_t& ilst ) {
+ typedef typename traits::matrix_traits< MatrixT >::value_type value_type;
+ integer_t info(0);
+ trexc_impl< value_type >::compute( compq, t, q, ifst, ilst, info );
+ return info;
+}
+
+// template function to call trexc
+template< typename MatrixT, typename MatrixQ, typename Workspace >
+inline integer_t trexc( char const compq, MatrixT& t, MatrixQ& q,
+ integer_t const ifst, integer_t const ilst,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixT >::value_type value_type;
+ integer_t info(0);
+ trexc_impl< value_type >::compute( compq, t, q, ifst, ilst, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trrfs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,249 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRRFS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRRFS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, float* a,
+ integer_t const lda, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float* ferr, float* berr, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_STRRFS( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void trrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, double* a,
+ integer_t const lda, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DTRRFS( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ }
+ inline void trrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* x, integer_t const ldx, float* ferr,
+ float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CTRRFS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void trrfs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* x, integer_t const ldx, double* ferr,
+ double* berr, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZTRRFS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct trrfs_impl{};
+
+// real specialization
+template< typename ValueType >
+struct trrfs_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename IWORK >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::trrfs( uplo, trans, diag, traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( uplo, trans, diag, a, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( uplo, trans, diag, a, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct trrfs_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename RWORK >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::trrfs( uplo, trans, diag, traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( uplo, trans, diag, a, b, x, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( uplo, trans, diag, a, b, x, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call trrfs
+template< typename MatrixA, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename Workspace >
+inline integer_t trrfs( char const uplo, char const trans,
+ char const diag, MatrixA& a, MatrixB& b, MatrixX& x, VectorFERR& ferr,
+ VectorBERR& berr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ trrfs_impl< value_type >::compute( uplo, trans, diag, a, b, x, ferr,
+ berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsen.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsen.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,144 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRSEN_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRSEN_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trsen( char const job, char const compq, logical_t* select,
+ integer_t const n, traits::complex_f* t, integer_t const ldt,
+ traits::complex_f* q, integer_t const ldq, traits::complex_f* w,
+ integer_t& m, float& s, float& sep, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CTRSEN( &job, &compq, select, &n, traits::complex_ptr(t), &ldt,
+ traits::complex_ptr(q), &ldq, traits::complex_ptr(w), &m, &s,
+ &sep, traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void trsen( char const job, char const compq, logical_t* select,
+ integer_t const n, traits::complex_d* t, integer_t const ldt,
+ traits::complex_d* q, integer_t const ldq, traits::complex_d* w,
+ integer_t& m, double& s, double& sep, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZTRSEN( &job, &compq, select, &n, traits::complex_ptr(t), &ldt,
+ traits::complex_ptr(q), &ldq, traits::complex_ptr(w), &m, &s,
+ &sep, traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trsen_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixQ,
+ typename VectorW, typename WORK >
+ static void compute( char const job, char const compq,
+ VectorSELECT& select, MatrixT& t, MatrixQ& q, VectorW& w,
+ integer_t& m, real_type& s, real_type& sep, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'N' || job == 'E' || job == 'V' || job == 'B' );
+ assert( compq == 'V' || compq == 'N' );
+ assert( traits::vector_size(select) >= traits::matrix_size2(t) );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(t) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::trsen( job, compq, traits::vector_storage(select),
+ traits::matrix_size2(t), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::vector_storage(w), m, s,
+ sep, traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixQ,
+ typename VectorW >
+ static void compute( char const job, char const compq,
+ VectorSELECT& select, MatrixT& t, MatrixQ& q, VectorW& w,
+ integer_t& m, real_type& s, real_type& sep, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( job, compq, select, t, q, w, m, s, sep, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixQ,
+ typename VectorW >
+ static void compute( char const job, char const compq,
+ VectorSELECT& select, MatrixT& t, MatrixQ& q, VectorW& w,
+ integer_t& m, real_type& s, real_type& sep, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::trsen( job, compq, traits::vector_storage(select),
+ traits::matrix_size2(t), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::matrix_storage(q),
+ traits::leading_dimension(q), traits::vector_storage(w), m, s,
+ sep, &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( job, compq, select, t, q, w, m, s, sep, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call trsen
+template< typename VectorSELECT, typename MatrixT, typename MatrixQ,
+ typename VectorW, typename Workspace >
+inline integer_t trsen( char const job, char const compq,
+ VectorSELECT& select, MatrixT& t, MatrixQ& q, VectorW& w,
+ integer_t& m,
+ typename traits::vector_traits< VectorSELECT >::value_type& s,
+ typename traits::vector_traits< VectorSELECT >::value_type& sep,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ trsen_impl< value_type >::compute( job, compq, select, t, q, w, m, s,
+ sep, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,244 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRSNA_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRSNA_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, float* t, integer_t const ldt, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr, float* s,
+ float* sep, integer_t const mm, integer_t& m, float* work,
+ integer_t const ldwork, integer_t* iwork, integer_t& info ) {
+ LAPACK_STRSNA( &job, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, s, sep, &mm, &m, work, &ldwork, iwork, &info );
+ }
+ inline void trsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, double* t, integer_t const ldt, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr, double* s,
+ double* sep, integer_t const mm, integer_t& m, double* work,
+ integer_t const ldwork, integer_t* iwork, integer_t& info ) {
+ LAPACK_DTRSNA( &job, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, s, sep, &mm, &m, work, &ldwork, iwork, &info );
+ }
+ inline void trsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_f* t, integer_t const ldt,
+ traits::complex_f* vl, integer_t const ldvl,
+ traits::complex_f* vr, integer_t const ldvr, float* s, float* sep,
+ integer_t const mm, integer_t& m, traits::complex_f* work,
+ integer_t const ldwork, float* rwork, integer_t& info ) {
+ LAPACK_CTRSNA( &job, &howmny, select, &n, traits::complex_ptr(t),
+ &ldt, traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, s, sep, &mm, &m, traits::complex_ptr(work), &ldwork,
+ rwork, &info );
+ }
+ inline void trsna( char const job, char const howmny, logical_t* select,
+ integer_t const n, traits::complex_d* t, integer_t const ldt,
+ traits::complex_d* vl, integer_t const ldvl,
+ traits::complex_d* vr, integer_t const ldvr, double* s,
+ double* sep, integer_t const mm, integer_t& m,
+ traits::complex_d* work, integer_t const ldwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZTRSNA( &job, &howmny, select, &n, traits::complex_ptr(t),
+ &ldt, traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, s, sep, &mm, &m, traits::complex_ptr(work), &ldwork,
+ rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct trsna_impl{};
+
+// real specialization
+template< typename ValueType >
+struct trsna_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP,
+ typename WORK, typename IWORK >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'V' || job == 'B' );
+ assert( howmny == 'A' || howmny == 'S' );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( $CALL_MIN_SIZE )));
+#endif
+ detail::trsna( job, howmny, traits::vector_storage(select),
+ traits::matrix_size2(t), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), traits::vector_storage(s),
+ traits::vector_storage(sep), mm, m,
+ traits::matrix_storage(work), traits::leading_dimension(work),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ $CALL_MIN_SIZE ) );
+ compute( job, howmny, select, t, vl, vr, s, sep, mm, m, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ integer_t& info, optimal_workspace work ) {
+ compute( job, howmny, select, t, vl, vr, s, sep, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_iwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct trsna_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP,
+ typename WORK, typename RWORK >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( job == 'E' || job == 'V' || job == 'B' );
+ assert( howmny == 'A' || howmny == 'S' );
+ assert( traits::matrix_size2(t) >= 0 );
+ assert( traits::leading_dimension(t) >= std::max(1,
+ traits::matrix_size2(t)) );
+ assert( mm >= m );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( $CALL_MIN_SIZE )));
+#endif
+ detail::trsna( job, howmny, traits::vector_storage(select),
+ traits::matrix_size2(t), traits::matrix_storage(t),
+ traits::leading_dimension(t), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), traits::vector_storage(s),
+ traits::vector_storage(sep), mm, m,
+ traits::matrix_storage(work), traits::leading_dimension(work),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ $CALL_MIN_SIZE ) );
+ compute( job, howmny, select, t, vl, vr, s, sep, mm, m, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP >
+ static void compute( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ integer_t& info, optimal_workspace work ) {
+ compute( job, howmny, select, t, vl, vr, s, sep, mm, m, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_rwork( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call trsna
+template< typename VectorSELECT, typename MatrixT, typename MatrixVL,
+ typename MatrixVR, typename VectorS, typename VectorSEP,
+ typename Workspace >
+inline integer_t trsna( char const job, char const howmny,
+ VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
+ VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorSELECT >::value_type value_type;
+ integer_t info(0);
+ trsna_impl< value_type >::compute( job, howmny, select, t, vl, vr, s,
+ sep, mm, m, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsyl.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsyl.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,147 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRSYL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRSYL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trsyl( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ float* a, integer_t const lda, float* b, integer_t const ldb,
+ float* c, integer_t const ldc, float& scale, integer_t& info ) {
+ LAPACK_STRSYL( &trana, &tranb, &isgn, &m, &n, a, &lda, b, &ldb, c,
+ &ldc, &scale, &info );
+ }
+ inline void trsyl( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ double* a, integer_t const lda, double* b, integer_t const ldb,
+ double* c, integer_t const ldc, double& scale, integer_t& info ) {
+ LAPACK_DTRSYL( &trana, &tranb, &isgn, &m, &n, a, &lda, b, &ldb, c,
+ &ldc, &scale, &info );
+ }
+ inline void trsyl( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* c, integer_t const ldc,
+ float& scale, integer_t& info ) {
+ LAPACK_CTRSYL( &trana, &tranb, &isgn, &m, &n, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(c),
+ &ldc, &scale, &info );
+ }
+ inline void trsyl( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* c, integer_t const ldc,
+ double& scale, integer_t& info ) {
+ LAPACK_ZTRSYL( &trana, &tranb, &isgn, &m, &n, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, traits::complex_ptr(c),
+ &ldc, &scale, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct trsyl_impl{};
+
+// real specialization
+template< typename ValueType >
+struct trsyl_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static void compute( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ MatrixA& a, MatrixB& b, MatrixC& c, real_type& scale,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( trana == 'N' || trana == 'T' || trana == 'C' );
+ assert( tranb == 'N' || tranb == 'T' || tranb == 'C' );
+ assert( m >= 0 );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(c) >= std::max(1,m) );
+#endif
+ detail::trsyl( trana, tranb, isgn, m, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(c),
+ traits::leading_dimension(c), scale, info );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct trsyl_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB, typename MatrixC >
+ static void compute( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ MatrixA& a, MatrixB& b, MatrixC& c, real_type& scale,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( trana == 'N' || trana == 'C' );
+ assert( tranb == 'N' || tranb == 'C' );
+ assert( m >= 0 );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(c) >= std::max(1,m) );
+#endif
+ detail::trsyl( trana, tranb, isgn, m, n, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(c),
+ traits::leading_dimension(c), scale, info );
+ }
+};
+
+
+// template function to call trsyl
+template< typename MatrixA, typename MatrixB, typename MatrixC >
+inline integer_t trsyl( char const trana, char const tranb,
+ integer_t const isgn, integer_t const m, integer_t const n,
+ MatrixA& a, MatrixB& b, MatrixC& c,
+ typename traits::matrix_traits< MatrixA >::value_type& scale ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ trsyl_impl< value_type >::compute( trana, tranb, isgn, m, n, a, b, c,
+ scale, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trtri.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trtri.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,86 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRTRI_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRTRI_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trtri( char const uplo, char const diag, integer_t const n,
+ float* a, integer_t const lda, integer_t& info ) {
+ LAPACK_STRTRI( &uplo, &diag, &n, a, &lda, &info );
+ }
+ inline void trtri( char const uplo, char const diag, integer_t const n,
+ double* a, integer_t const lda, integer_t& info ) {
+ LAPACK_DTRTRI( &uplo, &diag, &n, a, &lda, &info );
+ }
+ inline void trtri( char const uplo, char const diag, integer_t const n,
+ traits::complex_f* a, integer_t const lda, integer_t& info ) {
+ LAPACK_CTRTRI( &uplo, &diag, &n, traits::complex_ptr(a), &lda, &info );
+ }
+ inline void trtri( char const uplo, char const diag, integer_t const n,
+ traits::complex_d* a, integer_t const lda, integer_t& info ) {
+ LAPACK_ZTRTRI( &uplo, &diag, &n, traits::complex_ptr(a), &lda, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trtri_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA >
+ static void compute( char const uplo, char const diag, MatrixA& a,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::trtri( uplo, diag, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ info );
+ }
+};
+
+
+// template function to call trtri
+template< typename MatrixA >
+inline integer_t trtri( char const uplo, char const diag, MatrixA& a ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ trtri_impl< value_type >::compute( uplo, diag, a, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trtrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trtrs.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,106 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TRTRS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TRTRS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void trtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_STRTRS( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb,
+ &info );
+ }
+ inline void trtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DTRTRS( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb,
+ &info );
+ }
+ inline void trtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_CTRTRS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &info );
+ }
+ inline void trtrs( char const uplo, char const trans, char const diag,
+ integer_t const n, integer_t const nrhs, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_ZTRTRS( &uplo, &trans, &diag, &n, &nrhs,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct trtrs_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( char const uplo, char const trans, char const diag,
+ MatrixA& a, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( diag == 'N' || diag == 'U' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::trtrs( uplo, trans, diag, traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call trtrs
+template< typename MatrixA, typename MatrixB >
+inline integer_t trtrs( char const uplo, char const trans,
+ char const diag, MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ trtrs_impl< value_type >::compute( uplo, trans, diag, a, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,189 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_TZRZF_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_TZRZF_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void tzrzf( integer_t const m, integer_t const n, float* a,
+ integer_t const lda, float* tau, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_STZRZF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void tzrzf( integer_t const m, integer_t const n, double* a,
+ integer_t const lda, double* tau, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DTZRZF( &m, &n, a, &lda, tau, work, &lwork, &info );
+ }
+ inline void tzrzf( integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CTZRZF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void tzrzf( integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZTZRZF( &m, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct tzrzf_impl{};
+
+// real specialization
+template< typename ValueType >
+struct tzrzf_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= traits::matrix_size1(a) );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= traits::matrix_size1(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+#endif
+ detail::tzrzf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::tzrzf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct tzrzf_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= traits::matrix_size1(a) );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(tau) >= traits::matrix_size1(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::tzrzf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::tzrzf( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call tzrzf
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t tzrzf( MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ tzrzf_impl< value_type >::compute( a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungbr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungbr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGBR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGBR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ungbr( char const vect, integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGBR( &vect, &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ungbr( char const vect, integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGBR( &vect, &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ungbr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'Q' || vect == 'P' );
+ assert( m >= 0 );
+ assert( k >= 0 );
+ assert( traits::leading_dimension(a) >= m );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( m, n )));
+#endif
+ detail::ungbr( vect, m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( m, n ) );
+ compute( vect, m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ungbr( vect, m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( vect, m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ return std::max( 1, std::min( m, n ) );
+ }
+};
+
+
+// template function to call ungbr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t ungbr( char const vect, integer_t const m,
+ integer_t const n, integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ungbr_impl< value_type >::compute( vect, m, n, k, a, tau, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGHR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGHR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unghr( integer_t const n, integer_t const ilo,
+ integer_t const ihi, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGHR( &n, &ilo, &ihi, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void unghr( integer_t const n, integer_t const ilo,
+ integer_t const ihi, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGHR( &n, &ilo, &ihi, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unghr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::vector_size(tau) >= n-1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::unghr( n, ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( n, ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unghr( n, ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( n, ilo, ihi, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call unghr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t unghr( integer_t const n, integer_t const ilo,
+ integer_t const ihi, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unghr_impl< value_type >::compute( n, ilo, ihi, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGLQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGLQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unglq( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGLQ( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void unglq( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGLQ( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unglq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= m );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( m )));
+#endif
+ detail::unglq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( m ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unglq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unglq
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t unglq( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unglq_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGQL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGQL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ungql( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGQL( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ungql( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGQL( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ungql_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= n );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+#endif
+ detail::ungql( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ungql( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+
+// template function to call ungql
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t ungql( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ungql_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ungqr( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGQR( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ungqr( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGQR( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ungqr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= n );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+#endif
+ detail::ungqr( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ungqr( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, n );
+ }
+};
+
+
+// template function to call ungqr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t ungqr( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ungqr_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGRQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGRQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ungrq( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* tau, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGRQ( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ungrq( integer_t const m, integer_t const n,
+ integer_t const k, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* tau, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGRQ( &m, &n, &k, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ungrq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( m >= 0 );
+ assert( n >= m );
+ assert( k >= k );
+ assert( traits::leading_dimension(a) >= std::max(1,m) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( m )));
+#endif
+ detail::ungrq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( m ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ungrq( m, n, k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( m, n, k, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m ) {
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ungrq
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t ungrq( integer_t const m, integer_t const n,
+ integer_t const k, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ungrq_impl< value_type >::compute( m, n, k, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNGTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNGTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ungtr( char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNGTR( &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+ inline void ungtr( char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNGTR( &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau), traits::complex_ptr(work), &lwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ungtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename WORK >
+ static void compute( integer_t const n, MatrixA& a, VectorTAU& tau,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= n );
+ assert( traits::vector_size(tau) >= n-1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, m, n )));
+#endif
+ detail::ungtr( traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, MatrixA& a, VectorTAU& tau,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side, m,
+ n ) );
+ compute( n, a, tau, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU >
+ static void compute( integer_t const n, MatrixA& a, VectorTAU& tau,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ungtr( traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( n, a, tau, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call ungtr
+template< typename MatrixA, typename VectorTAU, typename Workspace >
+inline integer_t ungtr( integer_t const n, MatrixA& a, VectorTAU& tau,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ungtr_impl< value_type >::compute( n, a, tau, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmbr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmbr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,145 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMBR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMBR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmbr( char const vect, char const side, char const trans,
+ integer_t const m, integer_t const n, integer_t const k,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* c, integer_t const ldc,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMBR( &vect, &side, &trans, &m, &n, &k,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(tau),
+ traits::complex_ptr(c), &ldc, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+ inline void unmbr( char const vect, char const side, char const trans,
+ integer_t const m, integer_t const n, integer_t const k,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* c, integer_t const ldc,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMBR( &vect, &side, &trans, &m, &n, &k,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(tau),
+ traits::complex_ptr(c), &ldc, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmbr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const vect, char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( vect == 'Q' || vect == 'P' );
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( k >= 0 );
+ assert( traits::vector_size(tau) >= std::min(?NQ,k) );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmbr( vect, side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const vect, char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( vect, side, trans, k, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const vect, char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmbr( vect, side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( vect, side, trans, k, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmbr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmbr( char const vect, char const side,
+ char const trans, integer_t const k, MatrixA& a, VectorTAU& tau,
+ MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmbr_impl< value_type >::compute( vect, side, trans, k, a, tau, c,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmhr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmhr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,145 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMHR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMHR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmhr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* c, integer_t const ldc,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMHR( &side, &trans, &m, &n, &ilo, &ihi,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(tau),
+ traits::complex_ptr(c), &ldc, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+ inline void unmhr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const ilo, integer_t const ihi,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* c, integer_t const ldc,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMHR( &side, &trans, &m, &n, &ilo, &ihi,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(tau),
+ traits::complex_ptr(c), &ldc, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmhr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmhr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, ilo, ihi, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmhr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), ilo, ihi, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, ilo, ihi, a, tau, c, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmhr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmhr( char const side, char const trans,
+ integer_t const ilo, integer_t const ihi, MatrixA& a, VectorTAU& tau,
+ MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmhr_impl< value_type >::compute( side, trans, ilo, ihi, a, tau, c,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmlq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmlq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,140 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMLQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMLQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmlq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* tau, traits::complex_f* c,
+ integer_t const ldc, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMLQ( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void unmlq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* tau, traits::complex_d* c,
+ integer_t const ldc, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMLQ( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmlq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,k) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmlq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmlq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmlq
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmlq( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmlq_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmql.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmql.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMQL_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMQL_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmql( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* tau, traits::complex_f* c,
+ integer_t const ldc, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMQL( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void unmql( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* tau, traits::complex_d* c,
+ integer_t const ldc, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMQL( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmql_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmql( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmql( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmql
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmql( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmql_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMQR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMQR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmqr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* tau, traits::complex_f* c,
+ integer_t const ldc, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMQR( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void unmqr( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* tau, traits::complex_d* c,
+ integer_t const ldc, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMQR( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmqr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmqr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmqr( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmqr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmqr( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmqr_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmrq.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmrq.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,140 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMRQ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMRQ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmrq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* tau, traits::complex_f* c,
+ integer_t const ldc, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMRQ( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void unmrq( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* tau, traits::complex_d* c,
+ integer_t const ldc, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMRQ( &side, &trans, &m, &n, &k, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmrq_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,k) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmrq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmrq( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(tau),
+ traits::matrix_storage(c), traits::leading_dimension(c),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmrq
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmrq( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmrq_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmrz.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmrz.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,136 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMRZ_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMRZ_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmrz( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, integer_t const l,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* tau,
+ traits::complex_f* c, integer_t const ldc,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMRZ( &side, &trans, &m, &n, &k, &l, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void unmrz( char const side, char const trans, integer_t const m,
+ integer_t const n, integer_t const k, integer_t const l,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* tau,
+ traits::complex_d* c, integer_t const ldc,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMRZ( &side, &trans, &m, &n, &k, &l, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmrz_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,k) );
+ assert( traits::vector_size(tau) >= k );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::unmrz( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, integer_t const k,
+ MatrixA& a, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmrz( side, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), k, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, k, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call unmrz
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmrz( char const side, char const trans,
+ integer_t const k, MatrixA& a, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmrz_impl< value_type >::compute( side, trans, k, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,140 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UNMTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UNMTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void unmtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* tau, traits::complex_f* c,
+ integer_t const ldc, traits::complex_f* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_CUNMTR( &side, &uplo, &trans, &m, &n, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void unmtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* tau, traits::complex_d* c,
+ integer_t const ldc, traits::complex_d* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_ZUNMTR( &side, &uplo, &trans, &m, &n, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct unmtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( side, traits::matrix_size1(c),
+ traits::matrix_size2(c) )));
+#endif
+ detail::unmtr( side, traits::matrix_uplo_tag(a), trans,
+ traits::matrix_size1(c), traits::matrix_size2(c),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( side,
+ traits::matrix_size1(c), traits::matrix_size2(c) ) );
+ compute( side, trans, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::unmtr( side, traits::matrix_uplo_tag(a), trans,
+ traits::matrix_size1(c), traits::matrix_size2(c),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( side, trans, a, tau, c, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const side, integer_t const m,
+ integer_t const n ) {
+ if ( side == 'L' )
+ return std::max( 1, n );
+ else
+ return std::max( 1, m );
+ }
+};
+
+
+// template function to call unmtr
+template< typename MatrixA, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t unmtr( char const side, char const trans, MatrixA& a,
+ VectorTAU& tau, MatrixC& c, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ unmtr_impl< value_type >::compute( side, trans, a, tau, c, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upgtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upgtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UPGTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UPGTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void upgtr( char const uplo, integer_t const n,
+ traits::complex_f* ap, traits::complex_f* tau,
+ traits::complex_f* q, integer_t const ldq,
+ traits::complex_f* work, integer_t& info ) {
+ LAPACK_CUPGTR( &uplo, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(tau), traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(work), &info );
+ }
+ inline void upgtr( char const uplo, integer_t const n,
+ traits::complex_d* ap, traits::complex_d* tau,
+ traits::complex_d* q, integer_t const ldq,
+ traits::complex_d* work, integer_t& info ) {
+ LAPACK_ZUPGTR( &uplo, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(tau), traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct upgtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixQ,
+ typename WORK >
+ static void compute( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( traits::matrix_size2(q) >= 0 );
+ assert( traits::vector_size(ap) >=
+ traits::matrix_size2(q)*(traits::matrix_size2(q)+1)/2 );
+ assert( traits::vector_size(tau) >= traits::matrix_size2(q)-1 );
+ assert( traits::leading_dimension(q) >= std::max(1,
+ traits::matrix_size2(q)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(q) )));
+#endif
+ detail::upgtr( uplo, traits::matrix_size2(q),
+ traits::vector_storage(ap), traits::vector_storage(tau),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixQ >
+ static void compute( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(q) ) );
+ compute( uplo, ap, tau, q, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixQ >
+ static void compute( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( uplo, ap, tau, q, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n-1;
+ }
+};
+
+
+// template function to call upgtr
+template< typename VectorAP, typename VectorTAU, typename MatrixQ,
+ typename Workspace >
+inline integer_t upgtr( char const uplo, VectorAP& ap, VectorTAU& tau,
+ MatrixQ& q, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorAP >::value_type value_type;
+ integer_t info(0);
+ upgtr_impl< value_type >::compute( uplo, ap, tau, q, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,122 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_UPMTR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_UPMTR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void upmtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, traits::complex_f* ap,
+ traits::complex_f* tau, traits::complex_f* c, integer_t const ldc,
+ traits::complex_f* work, integer_t& info ) {
+ LAPACK_CUPMTR( &side, &uplo, &trans, &m, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &info );
+ }
+ inline void upmtr( char const side, char const uplo, char const trans,
+ integer_t const m, integer_t const n, traits::complex_d* ap,
+ traits::complex_d* tau, traits::complex_d* c, integer_t const ldc,
+ traits::complex_d* work, integer_t& info ) {
+ LAPACK_ZUPMTR( &side, &uplo, &trans, &m, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(tau), traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct upmtr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixC,
+ typename WORK >
+ static void compute( char const side, char const uplo, char const trans,
+ VectorAP& ap, VectorTAU& tau, MatrixC& c, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( side == 'L' || side == 'R' );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(c) >= 0 );
+ assert( traits::matrix_size2(c) >= 0 );
+ assert( traits::leading_dimension(c) >= std::max(1,
+ traits::matrix_size1(c)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+#endif
+ detail::upmtr( side, uplo, trans, traits::matrix_size1(c),
+ traits::matrix_size2(c), traits::vector_storage(ap),
+ traits::vector_storage(tau), traits::matrix_storage(c),
+ traits::leading_dimension(c),
+ traits::vector_storage(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const uplo, char const trans,
+ VectorAP& ap, VectorTAU& tau, MatrixC& c, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ compute( side, uplo, trans, ap, tau, c, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorAP, typename VectorTAU, typename MatrixC >
+ static void compute( char const side, char const uplo, char const trans,
+ VectorAP& ap, VectorTAU& tau, MatrixC& c, integer_t& info,
+ optimal_workspace work ) {
+ compute( side, uplo, trans, ap, tau, c, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+};
+
+
+// template function to call upmtr
+template< typename VectorAP, typename VectorTAU, typename MatrixC,
+ typename Workspace >
+inline integer_t upmtr( char const side, char const uplo,
+ char const trans, VectorAP& ap, VectorTAU& tau, MatrixC& c,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorAP >::value_type value_type;
+ integer_t info(0);
+ upmtr_impl< value_type >::compute( side, uplo, trans, ap, tau, c,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/cgesv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/cgesv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,128 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_CGESV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_CGESV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void cgesv( integer_t const n, integer_t const nrhs,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, traits::complex_d* work,
+ traits::complex_f* swork, integer_t& iter, integer_t& info ) {
+ LAPACK_ZCGESV( &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ traits::complex_ptr(work), traits::complex_ptr(swork), &iter,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct cgesv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename WORK, typename SWORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ integer_t& iter, integer_t& info, detail::workspace2< WORK,
+ SWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_swork( traits::matrix_size2(a),
+ traits::matrix_size2(b) )));
+#endif
+ detail::cgesv( traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::matrix_storage(work),
+ traits::vector_storage(work.select(value_type())), iter,
+ info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ integer_t& iter, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< value_type > tmp_swork( min_size_swork(
+ traits::matrix_size2(a), traits::matrix_size2(b) ) );
+ compute( a, ipiv, b, x, iter, info, workspace( tmp_work, tmp_swork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ integer_t& iter, integer_t& info, optimal_workspace work ) {
+ compute( a, ipiv, b, x, iter, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ return n*nrhs;
+ }
+
+ static integer_t min_size_swork( integer_t const n,
+ integer_t const nrhs ) {
+ return n*(n+nrhs);
+ }
+};
+
+
+// template function to call cgesv
+template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename Workspace >
+inline integer_t cgesv( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, integer_t& iter, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ cgesv_impl< value_type >::compute( a, ipiv, b, x, iter, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,102 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbsv( integer_t const n, integer_t const kl,
+ integer_t const ku, integer_t const nrhs, float* ab,
+ integer_t const ldab, integer_t* ipiv, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SGBSV( &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb, &info );
+ }
+ inline void gbsv( integer_t const n, integer_t const kl,
+ integer_t const ku, integer_t const nrhs, double* ab,
+ integer_t const ldab, integer_t* ipiv, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DGBSV( &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb, &info );
+ }
+ inline void gbsv( integer_t const n, integer_t const kl,
+ integer_t const ku, integer_t const nrhs, traits::complex_f* ab,
+ integer_t const ldab, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_CGBSV( &n, &kl, &ku, &nrhs, traits::complex_ptr(ab), &ldab,
+ ipiv, traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void gbsv( integer_t const n, integer_t const kl,
+ integer_t const ku, integer_t const nrhs, traits::complex_d* ab,
+ integer_t const ldab, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_ZGBSV( &n, &kl, &ku, &nrhs, traits::complex_ptr(ab), &ldab,
+ ipiv, traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gbsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename VectorIPIV, typename MatrixB >
+ static void compute( integer_t const kl, integer_t const ku, MatrixAB& ab,
+ VectorIPIV& ipiv, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(ab) >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(ab) >= 2 );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(ab) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ab)) );
+#endif
+ detail::gbsv( traits::matrix_size2(ab), kl, ku,
+ traits::matrix_size2(b), traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call gbsv
+template< typename MatrixAB, typename VectorIPIV, typename MatrixB >
+inline integer_t gbsv( integer_t const kl, integer_t const ku,
+ MatrixAB& ab, VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbsv_impl< value_type >::compute( kl, ku, ab, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,291 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GBSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GBSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gbsvx( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ float* ab, integer_t const ldab, float* afb,
+ integer_t const ldafb, integer_t* ipiv, char& equed, float* r,
+ float* c, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void gbsvx( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ double* ab, integer_t const ldab, double* afb,
+ integer_t const ldafb, integer_t* ipiv, char& equed, double* r,
+ double* c, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void gbsvx( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ traits::complex_f* ab, integer_t const ldab,
+ traits::complex_f* afb, integer_t const ldafb, integer_t* ipiv,
+ char& equed, float* r, float* c, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CGBSVX( &fact, &trans, &n, &kl, &ku, &nrhs,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(afb),
+ &ldafb, ipiv, &equed, r, c, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gbsvx( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, integer_t const nrhs,
+ traits::complex_d* ab, integer_t const ldab,
+ traits::complex_d* afb, integer_t const ldafb, integer_t* ipiv,
+ char& equed, double* r, double* c, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGBSVX( &fact, &trans, &n, &kl, &ku, &nrhs,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(afb),
+ &ldafb, ipiv, &equed, r, c, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gbsvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gbsvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' || fact == 'E' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+ assert( traits::leading_dimension(afb) >= 2 );
+ assert( equed == 'N' || equed == 'R' || equed == 'C' || equed == 'B' );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::gbsvx( fact, trans, n, kl, ku, traits::matrix_size2(x),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(afb), traits::leading_dimension(afb),
+ traits::vector_storage(ipiv), equed,
+ traits::vector_storage(r), traits::vector_storage(c),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( fact, trans, n, kl, ku, ab, afb, ipiv, equed, r, c, b, x,
+ rcond, ferr, berr, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, trans, n, kl, ku, ab, afb, ipiv, equed, r, c, b, x,
+ rcond, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gbsvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' || fact == 'E' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( kl >= 0 );
+ assert( ku >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kl+ku+1 );
+ assert( traits::leading_dimension(afb) >= 2 );
+ assert( equed == 'N' || equed == 'R' || equed == 'C' || equed == 'B' );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::gbsvx( fact, trans, n, kl, ku, traits::matrix_size2(x),
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(afb), traits::leading_dimension(afb),
+ traits::vector_storage(ipiv), equed,
+ traits::vector_storage(r), traits::vector_storage(c),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( fact, trans, n, kl, ku, ab, afb, ipiv, equed, r, c, b, x,
+ rcond, ferr, berr, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ integer_t const kl, integer_t const ku, MatrixAB& ab,
+ MatrixAFB& afb, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, trans, n, kl, ku, ab, afb, ipiv, equed, r, c, b, x,
+ rcond, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call gbsvx
+template< typename MatrixAB, typename MatrixAFB, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t gbsvx( char const fact, char const trans,
+ integer_t const n, integer_t const kl, integer_t const ku,
+ MatrixAB& ab, MatrixAFB& afb, VectorIPIV& ipiv, char& equed,
+ VectorR& r, VectorC& c, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixAB >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ gbsvx_impl< value_type >::compute( fact, trans, n, kl, ku, ab, afb,
+ ipiv, equed, r, c, b, x, rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gees.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gees.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,283 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEES_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEES_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gees( char const jobvs, char const sort, logical_t* select,
+ integer_t const n, float* a, integer_t const lda, integer_t& sdim,
+ float* wr, float* wi, float* vs, integer_t const ldvs,
+ float* work, integer_t const lwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_SGEES( &jobvs, &sort, &select, &n, a, &lda, &sdim, wr, wi, vs,
+ &ldvs, work, &lwork, bwork, &info );
+ }
+ inline void gees( char const jobvs, char const sort, logical_t* select,
+ integer_t const n, double* a, integer_t const lda,
+ integer_t& sdim, double* wr, double* wi, double* vs,
+ integer_t const ldvs, double* work, integer_t const lwork,
+ logical_t* bwork, integer_t& info ) {
+ LAPACK_DGEES( &jobvs, &sort, &select, &n, a, &lda, &sdim, wr, wi, vs,
+ &ldvs, work, &lwork, bwork, &info );
+ }
+ inline void gees( char const jobvs, char const sort, logical_t* select,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ integer_t& sdim, traits::complex_f* w, traits::complex_f* vs,
+ integer_t const ldvs, traits::complex_f* work,
+ integer_t const lwork, float* rwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_CGEES( &jobvs, &sort, &select, &n, traits::complex_ptr(a),
+ &lda, &sdim, traits::complex_ptr(w), traits::complex_ptr(vs),
+ &ldvs, traits::complex_ptr(work), &lwork, rwork, bwork,
+ &info );
+ }
+ inline void gees( char const jobvs, char const sort, logical_t* select,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ integer_t& sdim, traits::complex_d* w, traits::complex_d* vs,
+ integer_t const ldvs, traits::complex_d* work,
+ integer_t const lwork, double* rwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_ZGEES( &jobvs, &sort, &select, &n, traits::complex_ptr(a),
+ &lda, &sdim, traits::complex_ptr(w), traits::complex_ptr(vs),
+ &ldvs, traits::complex_ptr(work), &lwork, rwork, bwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gees_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gees_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS, typename WORK, typename BWORK >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ MatrixA& a, integer_t& sdim, VectorWR& wr, VectorWI& wi,
+ MatrixVS& vs, integer_t& info, detail::workspace2< WORK,
+ BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvs == 'N' || jobvs == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(wr) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(wi) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::gees( jobvs, sort, select, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), sdim,
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vs), traits::leading_dimension(vs),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ MatrixA& a, integer_t& sdim, VectorWR& wr, VectorWI& wi,
+ MatrixVS& vs, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvs, sort, select, a, sdim, wr, wi, vs, info,
+ workspace( tmp_work, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ MatrixA& a, integer_t& sdim, VectorWR& wr, VectorWI& wi,
+ MatrixVS& vs, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::gees( jobvs, sort, select, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), sdim,
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vs), traits::leading_dimension(vs),
+ &opt_size_work, -1, traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvs, sort, select, a, sdim, wr, wi, vs, info,
+ workspace( tmp_work, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 3*n );
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gees_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVS,
+ typename WORK, typename RWORK, typename BWORK >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ MatrixA& a, integer_t& sdim, VectorW& w, MatrixVS& vs,
+ integer_t& info, detail::workspace3< WORK, RWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvs == 'N' || jobvs == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::gees( jobvs, sort, select, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), sdim,
+ traits::vector_storage(w), traits::matrix_storage(vs),
+ traits::leading_dimension(vs),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ MatrixA& a, integer_t& sdim, VectorW& w, MatrixVS& vs,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvs, sort, select, a, sdim, w, vs, info,
+ workspace( tmp_work, tmp_rwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ MatrixA& a, integer_t& sdim, VectorW& w, MatrixVS& vs,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::gees( jobvs, sort, select, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), sdim,
+ traits::vector_storage(w), traits::matrix_storage(vs),
+ traits::leading_dimension(vs), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvs, sort, select, a, sdim, w, vs, info,
+ workspace( tmp_work, tmp_rwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+
+// template function to call gees
+template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS, typename Workspace >
+inline integer_t gees( char const jobvs, char const sort,
+ logical_t* select, MatrixA& a, integer_t& sdim, VectorWR& wr,
+ VectorWI& wi, MatrixVS& vs, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gees_impl< value_type >::compute( jobvs, sort, select, a, sdim, wr,
+ wi, vs, info, work );
+ return info;
+}
+
+// template function to call gees
+template< typename MatrixA, typename VectorW, typename MatrixVS,
+ typename Workspace >
+inline integer_t gees( char const jobvs, char const sort,
+ logical_t* select, MatrixA& a, integer_t& sdim, VectorW& w,
+ MatrixVS& vs, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gees_impl< value_type >::compute( jobvs, sort, select, a, sdim, w,
+ vs, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geesx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geesx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,325 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEESX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEESX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geesx( char const jobvs, char const sort, logical_t* select,
+ char const sense, integer_t const n, float* a,
+ integer_t const lda, integer_t& sdim, float* wr, float* wi,
+ float* vs, integer_t const ldvs, float& rconde, float& rcondv,
+ float* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_SGEESX( &jobvs, &sort, &select, &sense, &n, a, &lda, &sdim, wr,
+ wi, vs, &ldvs, &rconde, &rcondv, work, &lwork, iwork, &liwork,
+ bwork, &info );
+ }
+ inline void geesx( char const jobvs, char const sort, logical_t* select,
+ char const sense, integer_t const n, double* a,
+ integer_t const lda, integer_t& sdim, double* wr, double* wi,
+ double* vs, integer_t const ldvs, double& rconde, double& rcondv,
+ double* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_DGEESX( &jobvs, &sort, &select, &sense, &n, a, &lda, &sdim, wr,
+ wi, vs, &ldvs, &rconde, &rcondv, work, &lwork, iwork, &liwork,
+ bwork, &info );
+ }
+ inline void geesx( char const jobvs, char const sort, logical_t* select,
+ char const sense, integer_t const n, traits::complex_f* a,
+ integer_t const lda, integer_t& sdim, traits::complex_f* w,
+ traits::complex_f* vs, integer_t const ldvs, float& rconde,
+ float& rcondv, traits::complex_f* work, integer_t const lwork,
+ float* rwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_CGEESX( &jobvs, &sort, &select, &sense, &n,
+ traits::complex_ptr(a), &lda, &sdim, traits::complex_ptr(w),
+ traits::complex_ptr(vs), &ldvs, &rconde, &rcondv,
+ traits::complex_ptr(work), &lwork, rwork, bwork, &info );
+ }
+ inline void geesx( char const jobvs, char const sort, logical_t* select,
+ char const sense, integer_t const n, traits::complex_d* a,
+ integer_t const lda, integer_t& sdim, traits::complex_d* w,
+ traits::complex_d* vs, integer_t const ldvs, double& rconde,
+ double& rcondv, traits::complex_d* work, integer_t const lwork,
+ double* rwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_ZGEESX( &jobvs, &sort, &select, &sense, &n,
+ traits::complex_ptr(a), &lda, &sdim, traits::complex_ptr(w),
+ traits::complex_ptr(vs), &ldvs, &rconde, &rcondv,
+ traits::complex_ptr(work), &lwork, rwork, bwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct geesx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct geesx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS, typename WORK, typename IWORK, typename BWORK >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ char const sense, MatrixA& a, integer_t& sdim, VectorWR& wr,
+ VectorWI& wi, MatrixVS& vs, real_type& rconde, real_type& rcondv,
+ integer_t& info, detail::workspace3< WORK, IWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvs == 'N' || jobvs == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(wr) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(wi) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::geesx( jobvs, sort, select, sense, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), sdim,
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vs), traits::leading_dimension(vs),
+ rconde, rcondv,
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ char const sense, MatrixA& a, integer_t& sdim, VectorWR& wr,
+ VectorWI& wi, MatrixVS& vs, real_type& rconde, real_type& rcondv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvs, sort, select, sense, a, sdim, wr, wi, vs, rconde,
+ rcondv, info, workspace( tmp_work, tmp_iwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ char const sense, MatrixA& a, integer_t& sdim, VectorWR& wr,
+ VectorWI& wi, MatrixVS& vs, real_type& rconde, real_type& rcondv,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::geesx( jobvs, sort, select, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), sdim,
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vs), traits::leading_dimension(vs),
+ rconde, rcondv, &opt_size_work, -1, &opt_size_iwork, -1,
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobvs, sort, select, sense, a, sdim, wr, wi, vs, rconde,
+ rcondv, info, workspace( tmp_work, tmp_iwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n, char const sense ) {
+ if ( sense == 'N' )
+ return std::max( 1, 3*n );
+ else
+ return std::max( 1, n+n*n/2 );
+ }
+
+ static integer_t min_size_iwork( integer_t const n, char const sense ) {
+ if ( sense == 'N' || sense == 'E' )
+ return 1;
+ else
+ return std::max( 1, n*n/4 );
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct geesx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVS,
+ typename WORK, typename RWORK, typename BWORK >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ char const sense, MatrixA& a, integer_t& sdim, VectorW& w,
+ MatrixVS& vs, real_type& rconde, real_type& rcondv,
+ integer_t& info, detail::workspace3< WORK, RWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvs == 'N' || jobvs == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::geesx( jobvs, sort, select, sense, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a), sdim,
+ traits::vector_storage(w), traits::matrix_storage(vs),
+ traits::leading_dimension(vs), rconde, rcondv,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ char const sense, MatrixA& a, integer_t& sdim, VectorW& w,
+ MatrixVS& vs, real_type& rconde, real_type& rcondv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvs, sort, select, sense, a, sdim, w, vs, rconde, rcondv,
+ info, workspace( tmp_work, tmp_rwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVS >
+ static void compute( char const jobvs, char const sort, logical_t* select,
+ char const sense, MatrixA& a, integer_t& sdim, VectorW& w,
+ MatrixVS& vs, real_type& rconde, real_type& rcondv,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::geesx( jobvs, sort, select, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), sdim, traits::vector_storage(w),
+ traits::matrix_storage(vs), traits::leading_dimension(vs),
+ rconde, rcondv, &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvs, sort, select, sense, a, sdim, w, vs, rconde, rcondv,
+ info, workspace( tmp_work, tmp_rwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n, char const sense ) {
+ if ( sense == 'N' )
+ return std::max( 1, 2*n );
+ else
+ return std::max( 1, n*n/2 );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+
+// template function to call geesx
+template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVS, typename Workspace >
+inline integer_t geesx( char const jobvs, char const sort,
+ logical_t* select, char const sense, MatrixA& a, integer_t& sdim,
+ VectorWR& wr, VectorWI& wi, MatrixVS& vs,
+ typename traits::matrix_traits< MatrixA >::value_type& rconde,
+ typename traits::matrix_traits< MatrixA >::value_type& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geesx_impl< value_type >::compute( jobvs, sort, select, sense, a,
+ sdim, wr, wi, vs, rconde, rcondv, info, work );
+ return info;
+}
+
+// template function to call geesx
+template< typename MatrixA, typename VectorW, typename MatrixVS,
+ typename Workspace >
+inline integer_t geesx( char const jobvs, char const sort,
+ logical_t* select, char const sense, MatrixA& a, integer_t& sdim,
+ VectorW& w, MatrixVS& vs,
+ typename traits::matrix_traits< MatrixA >::value_type& rconde,
+ typename traits::matrix_traits< MatrixA >::value_type& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geesx_impl< value_type >::compute( jobvs, sort, select, sense, a,
+ sdim, w, vs, rconde, rcondv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,262 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geev( char const jobvl, char const jobvr, integer_t const n,
+ float* a, integer_t const lda, float* wr, float* wi, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEEV( &jobvl, &jobvr, &n, a, &lda, wr, wi, vl, &ldvl, vr,
+ &ldvr, work, &lwork, &info );
+ }
+ inline void geev( char const jobvl, char const jobvr, integer_t const n,
+ double* a, integer_t const lda, double* wr, double* wi,
+ double* vl, integer_t const ldvl, double* vr,
+ integer_t const ldvr, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DGEEV( &jobvl, &jobvr, &n, a, &lda, wr, wi, vl, &ldvl, vr,
+ &ldvr, work, &lwork, &info );
+ }
+ inline void geev( char const jobvl, char const jobvr, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* w,
+ traits::complex_f* vl, integer_t const ldvl,
+ traits::complex_f* vr, integer_t const ldvr,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CGEEV( &jobvl, &jobvr, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(w), traits::complex_ptr(vl), &ldvl,
+ traits::complex_ptr(vr), &ldvr, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+ inline void geev( char const jobvl, char const jobvr, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* w,
+ traits::complex_d* vl, integer_t const ldvl,
+ traits::complex_d* vr, integer_t const ldvr,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZGEEV( &jobvl, &jobvr, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(w), traits::complex_ptr(vl), &ldvl,
+ traits::complex_ptr(vr), &ldvr, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct geev_impl{};
+
+// real specialization
+template< typename ValueType >
+struct geev_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR, typename WORK >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ VectorWR& wr, VectorWI& wi, MatrixVL& vl, MatrixVR& vr,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(wr) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(wi) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobvl, jobvr, traits::matrix_size2(a) )));
+#endif
+ detail::geev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ VectorWR& wr, VectorWI& wi, MatrixVL& vl, MatrixVR& vr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobvl,
+ jobvr, traits::matrix_size2(a) ) );
+ compute( jobvl, jobvr, a, wr, wi, vl, vr, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ VectorWR& wr, VectorWI& wi, MatrixVL& vl, MatrixVR& vr,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::geev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvl, jobvr, a, wr, wi, vl, vr, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( char const jobvl, char const jobvr,
+ integer_t const n ) {
+ if ( jobvl == 'V' || jobvr == 'V' )
+ return std::max( 1, 4*n );
+ else
+ return std::max( 1, 3*n );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct geev_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR, typename WORK, typename RWORK >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ VectorW& w, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::geev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(w), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ VectorW& w, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( jobvl, jobvr, a, w, vl, vr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ VectorW& w, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::geev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(w), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvl, jobvr, a, w, vl, vr, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call geev
+template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR, typename Workspace >
+inline integer_t geev( char const jobvl, char const jobvr, MatrixA& a,
+ VectorWR& wr, VectorWI& wi, MatrixVL& vl, MatrixVR& vr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geev_impl< value_type >::compute( jobvl, jobvr, a, wr, wi, vl, vr,
+ info, work );
+ return info;
+}
+
+// template function to call geev
+template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR, typename Workspace >
+inline integer_t geev( char const jobvl, char const jobvr, MatrixA& a,
+ VectorW& w, MatrixVL& vl, MatrixVR& vr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geev_impl< value_type >::compute( jobvl, jobvr, a, w, vl, vr, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/geevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,354 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void geevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, float* a,
+ integer_t const lda, float* wr, float* wi, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr,
+ integer_t& ilo, integer_t& ihi, float* scale, float& abnrm,
+ float* rconde, float* rcondv, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SGEEVX( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, wr, wi,
+ vl, &ldvl, vr, &ldvr, &ilo, &ihi, scale, &abnrm, rconde,
+ rcondv, work, &lwork, iwork, &info );
+ }
+ inline void geevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, double* a,
+ integer_t const lda, double* wr, double* wi, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr,
+ integer_t& ilo, integer_t& ihi, double* scale, double& abnrm,
+ double* rconde, double* rcondv, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t& info ) {
+ LAPACK_DGEEVX( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, wr, wi,
+ vl, &ldvl, vr, &ldvr, &ilo, &ihi, scale, &abnrm, rconde,
+ rcondv, work, &lwork, iwork, &info );
+ }
+ inline void geevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* w, traits::complex_f* vl,
+ integer_t const ldvl, traits::complex_f* vr, integer_t const ldvr,
+ integer_t& ilo, integer_t& ihi, float* scale, float& abnrm,
+ float* rconde, float* rcondv, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t& info ) {
+ LAPACK_CGEEVX( &balanc, &jobvl, &jobvr, &sense, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(w),
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &ilo, &ihi, scale, &abnrm, rconde, rcondv,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void geevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* w, traits::complex_d* vl,
+ integer_t const ldvl, traits::complex_d* vr, integer_t const ldvr,
+ integer_t& ilo, integer_t& ihi, double* scale, double& abnrm,
+ double* rconde, double* rcondv, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t& info ) {
+ LAPACK_ZGEEVX( &balanc, &jobvl, &jobvr, &sense, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(w),
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &ilo, &ihi, scale, &abnrm, rconde, rcondv,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct geevx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct geevx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR, typename VectorSCALE,
+ typename VectorRCONDE, typename VectorRCONDV, typename WORK,
+ typename IWORK >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorWR& wr,
+ VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t& ilo,
+ integer_t& ihi, VectorSCALE& scale, real_type& abnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( balanc == 'N' || balanc == 'P' || balanc == 'S' ||
+ balanc == 'B' );
+ assert( jobvl == 'N' || jobvl == 'V' || jobvl == 'E' || jobvl == 'B' );
+ assert( jobvr == 'N' || jobvr == 'V' || jobvr == 'E' || jobvr == 'B' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(wr) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(wi) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(rconde) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(rcondv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ sense, jobvl, jobvr, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( sense, traits::matrix_size2(a) )));
+#endif
+ detail::geevx( balanc, jobvl, jobvr, sense, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(wr), traits::vector_storage(wi),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ ilo, ihi, traits::vector_storage(scale), abnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR, typename VectorSCALE,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorWR& wr,
+ VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t& ilo,
+ integer_t& ihi, VectorSCALE& scale, real_type& abnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( sense,
+ jobvl, jobvr, traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( sense,
+ traits::matrix_size2(a) ) );
+ compute( balanc, jobvl, jobvr, sense, a, wr, wi, vl, vr, ilo, ihi,
+ scale, abnrm, rconde, rcondv, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR, typename VectorSCALE,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorWR& wr,
+ VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t& ilo,
+ integer_t& ihi, VectorSCALE& scale, real_type& abnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( sense,
+ traits::matrix_size2(a) ) );
+ detail::geevx( balanc, jobvl, jobvr, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(wr),
+ traits::vector_storage(wi), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), ilo, ihi,
+ traits::vector_storage(scale), abnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv), &opt_size_work, -1,
+ traits::vector_storage(tmp_iwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( balanc, jobvl, jobvr, sense, a, wr, wi, vl, vr, ilo, ihi,
+ scale, abnrm, rconde, rcondv, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const sense, char const jobvl,
+ char const jobvr, integer_t const n ) {
+ if ( sense == 'N' || sense == 'E' ) {
+ if ( jobvl =='V' || jobvr == 'V' )
+ return std::max( 1, 3*n );
+ else
+ return std::max( 1, 2*n );
+ } else
+ return std::max( 1, n*(n+6) );
+ }
+
+ static integer_t min_size_iwork( char const sense, integer_t const n ) {
+ if ( sense == 'N' || sense == 'E' )
+ return 0;
+ else
+ return 2*n-2;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct geevx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR, typename VectorSCALE, typename VectorRCONDE,
+ typename VectorRCONDV, typename WORK, typename RWORK >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorW& w,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorSCALE& scale, real_type& abnrm, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( balanc == 'N' || balanc == 'P' || balanc == 'S' ||
+ balanc == 'B' );
+ assert( jobvl == 'N' || jobvl == 'V' || jobvl == 'E' || jobvl == 'B' );
+ assert( jobvr == 'N' || jobvr == 'V' || jobvr == 'E' || jobvr == 'B' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(rconde) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(rcondv) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( sense, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::geevx( balanc, jobvl, jobvr, sense, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(w), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), ilo, ihi,
+ traits::vector_storage(scale), abnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR, typename VectorSCALE, typename VectorRCONDE,
+ typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorW& w,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorSCALE& scale, real_type& abnrm, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( sense,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( balanc, jobvl, jobvr, sense, a, w, vl, vr, ilo, ihi, scale,
+ abnrm, rconde, rcondv, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR, typename VectorSCALE, typename VectorRCONDE,
+ typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorW& w,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorSCALE& scale, real_type& abnrm, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::geevx( balanc, jobvl, jobvr, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ ilo, ihi, traits::vector_storage(scale), abnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( balanc, jobvl, jobvr, sense, a, w, vl, vr, ilo, ihi, scale,
+ abnrm, rconde, rcondv, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( char const sense, integer_t const n ) {
+ if ( sense == 'N' || sense == 'E' )
+ return std::max( 1, 2*n );
+ else
+ return std::max( 1, n*n + 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call geevx
+template< typename MatrixA, typename VectorWR, typename VectorWI,
+ typename MatrixVL, typename MatrixVR, typename VectorSCALE,
+ typename VectorRCONDE, typename VectorRCONDV, typename Workspace >
+inline integer_t geevx( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorWR& wr,
+ VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t& ilo,
+ integer_t& ihi, VectorSCALE& scale,
+ typename traits::matrix_traits< MatrixA >::value_type& abnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geevx_impl< value_type >::compute( balanc, jobvl, jobvr, sense, a,
+ wr, wi, vl, vr, ilo, ihi, scale, abnrm, rconde, rcondv, info,
+ work );
+ return info;
+}
+
+// template function to call geevx
+template< typename MatrixA, typename VectorW, typename MatrixVL,
+ typename MatrixVR, typename VectorSCALE, typename VectorRCONDE,
+ typename VectorRCONDV, typename Workspace >
+inline integer_t geevx( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, VectorW& w,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorSCALE& scale,
+ typename traits::matrix_traits< MatrixA >::value_type& abnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ geevx_impl< value_type >::compute( balanc, jobvl, jobvr, sense, a, w,
+ vl, vr, ilo, ihi, scale, abnrm, rconde, rcondv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gegv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gegv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,285 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GEGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GEGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gegv( char const jobvl, char const jobvr, integer_t const n,
+ float* a, integer_t const lda, float* b, integer_t const ldb,
+ float* alphar, float* alphai, float* beta, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGEGV( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alphar, alphai,
+ beta, vl, &ldvl, vr, &ldvr, work, &lwork, &info );
+ }
+ inline void gegv( char const jobvl, char const jobvr, integer_t const n,
+ double* a, integer_t const lda, double* b, integer_t const ldb,
+ double* alphar, double* alphai, double* beta, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DGEGV( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alphar, alphai,
+ beta, vl, &ldvl, vr, &ldvr, work, &lwork, &info );
+ }
+ inline void gegv( char const jobvl, char const jobvr, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* alpha,
+ traits::complex_f* beta, traits::complex_f* vl,
+ integer_t const ldvl, traits::complex_f* vr, integer_t const ldvr,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CGEGV( &jobvl, &jobvr, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(alpha),
+ traits::complex_ptr(beta), traits::complex_ptr(vl), &ldvl,
+ traits::complex_ptr(vr), &ldvr, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+ inline void gegv( char const jobvl, char const jobvr, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* alpha,
+ traits::complex_d* beta, traits::complex_d* vl,
+ integer_t const ldvl, traits::complex_d* vr, integer_t const ldvr,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZGEGV( &jobvl, &jobvr, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(alpha),
+ traits::complex_ptr(beta), traits::complex_ptr(vl), &ldvl,
+ traits::complex_ptr(vr), &ldvr, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gegv_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gegv_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename WORK >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alphar) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+#endif
+ detail::gegv( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( jobvl, jobvr, a, b, alphar, alphai, beta, vl, vr, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gegv( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvl, jobvr, a, b, alphar, alphai, beta, vl, vr, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 8*n );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gegv_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename WORK, typename RWORK >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::gegv( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( jobvl, jobvr, a, b, alpha, beta, vl, vr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::gegv( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvl, jobvr, a, b, alpha, beta, vl, vr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 8*n;
+ }
+};
+
+
+// template function to call gegv
+template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename Workspace >
+inline integer_t gegv( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gegv_impl< value_type >::compute( jobvl, jobvr, a, b, alphar,
+ alphai, beta, vl, vr, info, work );
+ return info;
+}
+
+// template function to call gegv
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename Workspace >
+inline integer_t gegv( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gegv_impl< value_type >::compute( jobvl, jobvr, a, b, alpha, beta,
+ vl, vr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,215 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GELS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GELS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gels( char const trans, integer_t const m, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_SGELS( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,
+ &info );
+ }
+ inline void gels( char const trans, integer_t const m, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DGELS( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,
+ &info );
+ }
+ inline void gels( char const trans, integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGELS( &trans, &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+ inline void gels( char const trans, integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGELS( &trans, &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gels_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gels_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename WORK >
+ static void compute( char const trans, MatrixA& a, MatrixB& b,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'T' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) )));
+#endif
+ detail::gels( trans, traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( char const trans, MatrixA& a, MatrixB& b,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) ) );
+ compute( trans, a, b, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( char const trans, MatrixA& a, MatrixB& b,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gels( trans, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( trans, a, b, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const nrhs ) {
+ integer_t minmn = std::min( m, n );
+ return std::max( 1, minmn + std::max( minmn, nrhs ) );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gels_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename WORK >
+ static void compute( char const trans, MatrixA& a, MatrixB& b,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( trans == 'N' || trans == 'C' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_size2(b) )));
+#endif
+ detail::gels( trans, traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( char const trans, MatrixA& a, MatrixB& b,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) ) );
+ compute( trans, a, b, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( char const trans, MatrixA& a, MatrixB& b,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::gels( trans, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( trans, a, b, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const nrhs ) {
+ integer_t minmn = std::min( m, n );
+ return std::max( 1, minmn + std::max( minmn, nrhs ) );
+ }
+};
+
+
+// template function to call gels
+template< typename MatrixA, typename MatrixB, typename Workspace >
+inline integer_t gels( char const trans, MatrixA& a, MatrixB& b,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gels_impl< value_type >::compute( trans, a, b, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,302 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GELSD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GELSD_HPP
+
+#include <boost/numeric/bindings/lapack/auxiliary/ilaenv.hpp>
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gelsd( integer_t const m, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* s, float const rcond, integer_t& rank,
+ float* work, integer_t const lwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_SGELSD( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, &rank,
+ work, &lwork, iwork, &info );
+ }
+ inline void gelsd( integer_t const m, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* s, double const rcond,
+ integer_t& rank, double* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DGELSD( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, &rank,
+ work, &lwork, iwork, &info );
+ }
+ inline void gelsd( integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, float* s,
+ float const rcond, integer_t& rank, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_CGELSD( &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, s, &rcond, &rank,
+ traits::complex_ptr(work), &lwork, rwork, iwork, &info );
+ }
+ inline void gelsd( integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, double* s,
+ double const rcond, integer_t& rank, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_ZGELSD( &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, s, &rcond, &rank,
+ traits::complex_ptr(work), &lwork, rwork, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gelsd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gelsd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS,
+ typename WORK, typename IWORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ integer_t smlsiz = ilaenv(9, "GELSD", "");
+ integer_t nlvl = static_cast<integer_t>(((std::log(
+ static_cast<real_type>(minmn)) /
+ std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ minmn, smlsiz, nlvl, traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( minmn, nlvl )));
+#endif
+ detail::gelsd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank, traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ integer_t smlsiz = ilaenv(9, "GELSD", "");
+ integer_t nlvl = static_cast<integer_t>(((std::log(
+ static_cast<real_type>(minmn)) /
+ std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ traits::detail::array< real_type > tmp_work( min_size_work( minmn,
+ smlsiz, nlvl, traits::matrix_size2(b) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( minmn,
+ nlvl ) );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::gelsd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank, &opt_size_work, -1, &opt_size_iwork, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const minmn,
+ integer_t const smlsiz, integer_t const nlvl,
+ integer_t const nrhs ) {
+ integer_t smlsiz_plus_one = smlsiz + 1;
+ return std::max( 1, 12*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
+ minmn*nrhs + smlsiz_plus_one * smlsiz_plus_one );
+ }
+
+ static integer_t min_size_iwork( integer_t const minmn,
+ integer_t const nlvl ) {
+ return std::max( 1, 3*minmn*nlvl + 11*minmn );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gelsd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ integer_t smlsiz = ilaenv(9, "GELSD", "");
+ integer_t nlvl = static_cast<integer_t>(((std::log(
+ static_cast<real_type>(minmn)) /
+ std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( minmn, traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( minmn, smlsiz, nlvl,
+ traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( minmn, nlvl )));
+#endif
+ detail::gelsd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ integer_t smlsiz = ilaenv(9, "GELSD", "");
+ integer_t nlvl = static_cast<integer_t>(((std::log(
+ static_cast<real_type>(minmn)) /
+ std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ traits::detail::array< value_type > tmp_work( min_size_work( minmn,
+ traits::matrix_size2(b) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( minmn,
+ smlsiz, nlvl, traits::matrix_size2(b) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( minmn,
+ nlvl ) );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::gelsd( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank, &opt_size_work, -1, &opt_size_rwork,
+ &opt_size_iwork, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const minmn,
+ integer_t const nrhs ) {
+ return std::max( 1, 2*minmn + minmn*nrhs );
+ }
+
+ static integer_t min_size_rwork( integer_t const minmn,
+ integer_t const smlsiz, integer_t const nlvl,
+ integer_t const nrhs ) {
+ integer_t smlsiz_plus_one = smlsiz + 1;
+ return std::max( 1, 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
+ 3*smlsiz*nrhs + smlsiz_plus_one * smlsiz_plus_one );
+ }
+
+ static integer_t min_size_iwork( integer_t const minmn,
+ integer_t const nlvl ) {
+ return std::max( 1, 3*minmn*nlvl + 11*minmn );
+ }
+};
+
+
+// template function to call gelsd
+template< typename MatrixA, typename MatrixB, typename VectorS,
+ typename Workspace >
+inline integer_t gelsd( MatrixA& a, MatrixB& b, VectorS& s,
+ typename traits::matrix_traits< MatrixA >::value_type const rcond,
+ integer_t& rank, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gelsd_impl< value_type >::compute( a, b, s, rcond, rank, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelss.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelss.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,251 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GELSS_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GELSS_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gelss( integer_t const m, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* s, float const rcond, integer_t& rank,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGELSS( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, &rank,
+ work, &lwork, &info );
+ }
+ inline void gelss( integer_t const m, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* s, double const rcond,
+ integer_t& rank, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DGELSS( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, &rank,
+ work, &lwork, &info );
+ }
+ inline void gelss( integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, float* s,
+ float const rcond, integer_t& rank, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t& info ) {
+ LAPACK_CGELSS( &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, s, &rcond, &rank,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void gelss( integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, double* s,
+ double const rcond, integer_t& rank, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t& info ) {
+ LAPACK_ZGELSS( &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, s, &rcond, &rank,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gelss_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gelss_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS,
+ typename WORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) )));
+#endif
+ detail::gelss( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank, traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) ) );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gelss( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank, &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const nrhs ) {
+ integer_t minmn = std::min( m, n );
+ return std::max( 1, 3*minmn + std::max( std::max( 2*minmn, std::max(m,
+ n) ), nrhs ) );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gelss_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS,
+ typename WORK, typename RWORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_size2(b), minmn )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( minmn )));
+#endif
+ detail::gelss( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), minmn ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ minmn ) );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorS >
+ static void compute( MatrixA& a, MatrixB& b, VectorS& s,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ minmn ) );
+ detail::gelss( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(s),
+ rcond, rank, &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, s, rcond, rank, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const nrhs, integer_t const minmn ) {
+ return std::max( 1, 2*minmn + std::max( std::max( m,n ), nrhs ) );
+ }
+
+ static integer_t min_size_rwork( integer_t const minmn ) {
+ return 5*minmn;
+ }
+};
+
+
+// template function to call gelss
+template< typename MatrixA, typename MatrixB, typename VectorS,
+ typename Workspace >
+inline integer_t gelss( MatrixA& a, MatrixB& b, VectorS& s,
+ typename traits::matrix_traits< MatrixA >::value_type const rcond,
+ integer_t& rank, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gelss_impl< value_type >::compute( a, b, s, rcond, rank, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsy.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsy.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,243 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GELSY_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GELSY_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gelsy( integer_t const m, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* b,
+ integer_t const ldb, integer_t* jpvt, float const rcond,
+ integer_t& rank, float* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_SGELSY( &m, &n, &nrhs, a, &lda, b, &ldb, jpvt, &rcond, &rank,
+ work, &lwork, &info );
+ }
+ inline void gelsy( integer_t const m, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* b,
+ integer_t const ldb, integer_t* jpvt, double const rcond,
+ integer_t& rank, double* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_DGELSY( &m, &n, &nrhs, a, &lda, b, &ldb, jpvt, &rcond, &rank,
+ work, &lwork, &info );
+ }
+ inline void gelsy( integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, integer_t* jpvt,
+ float const rcond, integer_t& rank, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t& info ) {
+ LAPACK_CGELSY( &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, jpvt, &rcond, &rank,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void gelsy( integer_t const m, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, integer_t* jpvt,
+ double const rcond, integer_t& rank, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t& info ) {
+ LAPACK_ZGELSY( &m, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, jpvt, &rcond, &rank,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gelsy_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gelsy_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorJPVT,
+ typename WORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) )));
+#endif
+ detail::gelsy( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(jpvt),
+ rcond, rank, traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorJPVT >
+ static void compute( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) ) );
+ compute( a, b, jpvt, rcond, rank, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorJPVT >
+ static void compute( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gelsy( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(jpvt),
+ rcond, rank, &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, jpvt, rcond, rank, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const nrhs ) {
+ integer_t minmn = std::min( m, n );
+ return std::max( 1, std::max( minmn+3*n+1, 2*minmn+nrhs ));
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gelsy_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorJPVT,
+ typename WORK, typename RWORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ std::max(traits::matrix_size1(a),traits::matrix_size2(a))) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::gelsy( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(jpvt),
+ rcond, rank,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorJPVT >
+ static void compute( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( a, b, jpvt, rcond, rank, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorJPVT >
+ static void compute( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::gelsy( traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(jpvt),
+ rcond, rank, &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, jpvt, rcond, rank, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const nrhs ) {
+ integer_t minmn = std::min( m, n );
+ return std::max( 1, std::max( std::max( 2*minmn, n+1 ), minmn+nrhs ) );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call gelsy
+template< typename MatrixA, typename MatrixB, typename VectorJPVT,
+ typename Workspace >
+inline integer_t gelsy( MatrixA& a, MatrixB& b, VectorJPVT& jpvt,
+ typename traits::matrix_traits< MatrixA >::value_type const rcond,
+ integer_t& rank, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gelsy_impl< value_type >::compute( a, b, jpvt, rcond, rank, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,273 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GESDD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GESDD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gesdd( char const jobz, integer_t const m, integer_t const n,
+ float* a, integer_t const lda, float* s, float* u,
+ integer_t const ldu, float* vt, integer_t const ldvt, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t& info ) {
+ LAPACK_SGESDD( &jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
+ &lwork, iwork, &info );
+ }
+ inline void gesdd( char const jobz, integer_t const m, integer_t const n,
+ double* a, integer_t const lda, double* s, double* u,
+ integer_t const ldu, double* vt, integer_t const ldvt,
+ double* work, integer_t const lwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_DGESDD( &jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
+ &lwork, iwork, &info );
+ }
+ inline void gesdd( char const jobz, integer_t const m, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float* s,
+ traits::complex_f* u, integer_t const ldu, traits::complex_f* vt,
+ integer_t const ldvt, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_CGESDD( &jobz, &m, &n, traits::complex_ptr(a), &lda, s,
+ traits::complex_ptr(u), &ldu, traits::complex_ptr(vt), &ldvt,
+ traits::complex_ptr(work), &lwork, rwork, iwork, &info );
+ }
+ inline void gesdd( char const jobz, integer_t const m, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double* s,
+ traits::complex_d* u, integer_t const ldu, traits::complex_d* vt,
+ integer_t const ldvt, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_ZGESDD( &jobz, &m, &n, traits::complex_ptr(a), &lda, s,
+ traits::complex_ptr(u), &ldu, traits::complex_ptr(vt), &ldvt,
+ traits::complex_ptr(work), &lwork, rwork, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gesdd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gesdd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT, typename WORK, typename IWORK >
+ static void compute( char const jobz, MatrixA& a, VectorS& s, MatrixU& u,
+ MatrixVT& vt, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ assert( jobz == 'A' || jobz == 'S' || jobz == 'O' || jobz == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a), jobz,
+ minmn )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( minmn )));
+#endif
+ detail::gesdd( jobz, traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(s), traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(vt),
+ traits::leading_dimension(vt),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobz, MatrixA& a, VectorS& s, MatrixU& u,
+ MatrixVT& vt, integer_t& info, minimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a), jobz,
+ minmn ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ minmn ) );
+ compute( jobz, a, s, u, vt, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobz, MatrixA& a, VectorS& s, MatrixU& u,
+ MatrixVT& vt, integer_t& info, optimal_workspace work ) {
+ compute( jobz, a, s, u, vt, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ char const jobz, integer_t const minmn ) {
+ if ( n == 0 ) return 1;
+ if ( jobz == 'N' ) return 3*minmn + std::max( std::max(m,n), 7*minmn );
+ if ( jobz == 'O' ) return 3*minmn*minmn + std::max( std::max( m,n ),
+ 5*minmn*minmn + 4*minmn );
+ return 3*minmn*minmn + std::max( std::max( m,n ), 4*minmn*minmn +
+ 4*minmn );
+ }
+
+ static integer_t min_size_iwork( integer_t const minmn ) {
+ return 8*minmn;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gesdd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT, typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const jobz, MatrixA& a, VectorS& s, MatrixU& u,
+ MatrixVT& vt, integer_t& info, detail::workspace3< WORK, RWORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ assert( jobz == 'A' || jobz == 'S' || jobz == 'O' || jobz == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(a), jobz, minmn )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( minmn, jobz )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( minmn )));
+#endif
+ detail::gesdd( jobz, traits::matrix_size1(a), traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(s), traits::matrix_storage(u),
+ traits::leading_dimension(u), traits::matrix_storage(vt),
+ traits::leading_dimension(vt),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobz, MatrixA& a, VectorS& s, MatrixU& u,
+ MatrixVT& vt, integer_t& info, minimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a), jobz,
+ minmn ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( minmn,
+ jobz ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ minmn ) );
+ compute( jobz, a, s, u, vt, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobz, MatrixA& a, VectorS& s, MatrixU& u,
+ MatrixVT& vt, integer_t& info, optimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( minmn,
+ jobz ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ minmn ) );
+ detail::gesdd( jobz, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(s),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_iwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobz, a, s, u, vt, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ char const jobz, integer_t const minmn ) {
+ if ( n == 0 ) return 1;
+ if ( jobz == 'N' ) return 2*minmn + std::max( m,n );
+ if ( jobz == 'O' ) return 2*(minmn*minmn + minmn) + std::max( m, n );
+ return minmn*minmn + 2*minmn + std::max( m, n );
+ }
+
+ static integer_t min_size_rwork( integer_t const minmn, char const jobz ) {
+ if ( jobz == 'N' ) return 5*minmn;
+ return 5*minmn*minmn + 7*minmn;
+ }
+
+ static integer_t min_size_iwork( integer_t const minmn ) {
+ return 8*minmn;
+ }
+};
+
+
+// template function to call gesdd
+template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT, typename Workspace >
+inline integer_t gesdd( char const jobz, MatrixA& a, VectorS& s,
+ MatrixU& u, MatrixVT& vt, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gesdd_impl< value_type >::compute( jobz, a, s, u, vt, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GESV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GESV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gesv( integer_t const n, integer_t const nrhs, float* a,
+ integer_t const lda, integer_t* ipiv, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SGESV( &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ }
+ inline void gesv( integer_t const n, integer_t const nrhs, double* a,
+ integer_t const lda, integer_t* ipiv, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DGESV( &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ }
+ inline void gesv( integer_t const n, integer_t const nrhs,
+ traits::complex_f* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CGESV( &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void gesv( integer_t const n, integer_t const nrhs,
+ traits::complex_d* a, integer_t const lda, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZGESV( &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gesv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::gesv( traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call gesv
+template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+inline integer_t gesv( MatrixA& a, VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gesv_impl< value_type >::compute( a, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,252 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GESVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GESVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gesvd( char const jobu, char const jobvt, integer_t const m,
+ integer_t const n, float* a, integer_t const lda, float* s,
+ float* u, integer_t const ldu, float* vt, integer_t const ldvt,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGESVD( &jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
+ work, &lwork, &info );
+ }
+ inline void gesvd( char const jobu, char const jobvt, integer_t const m,
+ integer_t const n, double* a, integer_t const lda, double* s,
+ double* u, integer_t const ldu, double* vt, integer_t const ldvt,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DGESVD( &jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
+ work, &lwork, &info );
+ }
+ inline void gesvd( char const jobu, char const jobvt, integer_t const m,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ float* s, traits::complex_f* u, integer_t const ldu,
+ traits::complex_f* vt, integer_t const ldvt,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CGESVD( &jobu, &jobvt, &m, &n, traits::complex_ptr(a), &lda, s,
+ traits::complex_ptr(u), &ldu, traits::complex_ptr(vt), &ldvt,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void gesvd( char const jobu, char const jobvt, integer_t const m,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ double* s, traits::complex_d* u, integer_t const ldu,
+ traits::complex_d* vt, integer_t const ldvt,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZGESVD( &jobu, &jobvt, &m, &n, traits::complex_ptr(a), &lda, s,
+ traits::complex_ptr(u), &ldu, traits::complex_ptr(vt), &ldvt,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gesvd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gesvd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT, typename WORK >
+ static void compute( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'A' || jobu == 'S' || jobu == 'O' || jobu == 'N' );
+ assert( jobvt == 'A' || jobvt == 'S' || jobvt == 'O' || jobvt == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a) )));
+#endif
+ detail::gesvd( jobu, jobvt, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(s),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a) ) );
+ compute( jobu, jobvt, a, s, u, vt, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gesvd( jobu, jobvt, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(s),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobu, jobvt, a, s, u, vt, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n ) {
+ integer_t minmn = std::min( m, n );
+ return std::max( 1, std::max( 3*minmn+std::max(m,n), 5*minmn ) );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gesvd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT, typename WORK, typename RWORK >
+ static void compute( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ assert( jobu == 'A' || jobu == 'S' || jobu == 'O' || jobu == 'N' );
+ assert( jobvt == 'A' || jobvt == 'S' || jobvt == 'O' || jobvt == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::vector_size(s) >= std::min(traits::matrix_size1(a),
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(a), minmn )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( minmn )));
+#endif
+ detail::gesvd( jobu, jobvt, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(s),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt, integer_t& info,
+ minimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(a), minmn ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ minmn ) );
+ compute( jobu, jobvt, a, s, u, vt, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT >
+ static void compute( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt, integer_t& info,
+ optimal_workspace work ) {
+ integer_t minmn = std::min( traits::matrix_size1(a),
+ traits::matrix_size2(a) );
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ minmn ) );
+ detail::gesvd( jobu, jobvt, traits::matrix_size1(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(s),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(vt), traits::leading_dimension(vt),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobu, jobvt, a, s, u, vt, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const minmn ) {
+ return std::max( 1, 2*minmn+std::max(m,n) );
+ }
+
+ static integer_t min_size_rwork( integer_t const minmn ) {
+ return 5*minmn;
+ }
+};
+
+
+// template function to call gesvd
+template< typename MatrixA, typename VectorS, typename MatrixU,
+ typename MatrixVT, typename Workspace >
+inline integer_t gesvd( char const jobu, char const jobvt, MatrixA& a,
+ VectorS& s, MatrixU& u, MatrixVT& vt,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gesvd_impl< value_type >::compute( jobu, jobvt, a, s, u, vt, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,286 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GESVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GESVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gesvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* af,
+ integer_t const ldaf, integer_t* ipiv, char& equed, float* r,
+ float* c, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SGESVX( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ &equed, r, c, b, &ldb, x, &ldx, &rcond, ferr, berr, work,
+ iwork, &info );
+ }
+ inline void gesvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* af,
+ integer_t const ldaf, integer_t* ipiv, char& equed, double* r,
+ double* c, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DGESVX( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ &equed, r, c, b, &ldb, x, &ldx, &rcond, ferr, berr, work,
+ iwork, &info );
+ }
+ inline void gesvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, integer_t* ipiv,
+ char& equed, float* r, float* c, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CGESVX( &fact, &trans, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, &equed, r, c,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gesvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, integer_t* ipiv,
+ char& equed, double* r, double* c, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGESVX( &fact, &trans, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, &equed, r, c,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gesvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gesvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' || fact == 'E' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( equed == 'N' || equed == 'R' || equed == 'C' || equed == 'B' );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::gesvx( fact, trans, traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ equed, traits::vector_storage(r), traits::vector_storage(c),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, trans, a, af, ipiv, equed, r, c, b, x, rcond, ferr,
+ berr, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, trans, a, af, ipiv, equed, r, c, b, x, rcond, ferr,
+ berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 4*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gesvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' || fact == 'E' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( equed == 'N' || equed == 'R' || equed == 'C' || equed == 'B' );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::gesvx( fact, trans, traits::matrix_size2(a),
+ traits::matrix_size2(x), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(af),
+ traits::leading_dimension(af), traits::vector_storage(ipiv),
+ equed, traits::vector_storage(r), traits::vector_storage(c),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, trans, a, af, ipiv, equed, r, c, b, x, rcond, ferr,
+ berr, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r,
+ VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, trans, a, af, ipiv, equed, r, c, b, x, rcond, ferr,
+ berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+
+// template function to call gesvx
+template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename VectorR, typename VectorC, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t gesvx( char const fact, char const trans, MatrixA& a,
+ MatrixAF& af, VectorIPIV& ipiv, char& equed, VectorR& r, VectorC& c,
+ MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gesvx_impl< value_type >::compute( fact, trans, a, af, ipiv, equed,
+ r, c, b, x, rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,340 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGES_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGES_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gges( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ integer_t& sdim, float* alphar, float* alphai, float* beta,
+ float* vsl, integer_t const ldvsl, float* vsr,
+ integer_t const ldvsr, float* work, integer_t const lwork,
+ logical_t* bwork, integer_t& info ) {
+ LAPACK_SGGES( &jobvsl, &jobvsr, &sort, &selctg, &n, a, &lda, b, &ldb,
+ &sdim, alphar, alphai, beta, vsl, &ldvsl, vsr, &ldvsr, work,
+ &lwork, bwork, &info );
+ }
+ inline void gges( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ integer_t& sdim, double* alphar, double* alphai, double* beta,
+ double* vsl, integer_t const ldvsl, double* vsr,
+ integer_t const ldvsr, double* work, integer_t const lwork,
+ logical_t* bwork, integer_t& info ) {
+ LAPACK_DGGES( &jobvsl, &jobvsr, &sort, &selctg, &n, a, &lda, b, &ldb,
+ &sdim, alphar, alphai, beta, vsl, &ldvsl, vsr, &ldvsr, work,
+ &lwork, bwork, &info );
+ }
+ inline void gges( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ integer_t& sdim, traits::complex_f* alpha,
+ traits::complex_f* beta, traits::complex_f* vsl,
+ integer_t const ldvsl, traits::complex_f* vsr,
+ integer_t const ldvsr, traits::complex_f* work,
+ integer_t const lwork, float* rwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_CGGES( &jobvsl, &jobvsr, &sort, &selctg, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &sdim, traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(vsl), &ldvsl, traits::complex_ptr(vsr),
+ &ldvsr, traits::complex_ptr(work), &lwork, rwork, bwork,
+ &info );
+ }
+ inline void gges( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ integer_t& sdim, traits::complex_d* alpha,
+ traits::complex_d* beta, traits::complex_d* vsl,
+ integer_t const ldvsl, traits::complex_d* vsr,
+ integer_t const ldvsr, traits::complex_d* work,
+ integer_t const lwork, double* rwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_ZGGES( &jobvsl, &jobvsr, &sort, &selctg, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &sdim, traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(vsl), &ldvsl, traits::complex_ptr(vsr),
+ &ldvsr, traits::complex_ptr(work), &lwork, rwork, bwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gges_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gges_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR, typename WORK, typename BWORK >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVSL& vsl, MatrixVSR& vsr, integer_t& info,
+ detail::workspace2< WORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvsl == 'N' || jobvsl == 'V' );
+ assert( jobvsr == 'N' || jobvsr == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alphar) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(alphai) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::gges( jobvsl, jobvsr, sort, selctg, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), sdim,
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVSL& vsl, MatrixVSR& vsr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvsl, jobvsr, sort, selctg, a, b, sdim, alphar, alphai,
+ beta, vsl, vsr, info, workspace( tmp_work, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVSL& vsl, MatrixVSR& vsr, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::gges( jobvsl, jobvsr, sort, selctg,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), sdim,
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ &opt_size_work, -1, traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvsl, jobvsr, sort, selctg, a, b, sdim, alphar, alphai,
+ beta, vsl, vsr, info, workspace( tmp_work, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 8*n + 16 );
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gges_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR,
+ typename WORK, typename RWORK, typename BWORK >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, integer_t& info,
+ detail::workspace3< WORK, RWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvsl == 'N' || jobvsl == 'V' );
+ assert( jobvsr == 'N' || jobvsr == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::gges( jobvsl, jobvsr, sort, selctg, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), sdim,
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvsl, jobvsr, sort, selctg, a, b, sdim, alpha, beta, vsl,
+ vsr, info, workspace( tmp_work, tmp_rwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::gges( jobvsl, jobvsr, sort, selctg,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), sdim,
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvsl, jobvsr, sort, selctg, a, b, sdim, alpha, beta, vsl,
+ vsr, info, workspace( tmp_work, tmp_rwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 8*n;
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+
+// template function to call gges
+template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR, typename Workspace >
+inline integer_t gges( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVSL& vsl, MatrixVSR& vsr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gges_impl< value_type >::compute( jobvsl, jobvsr, sort, selctg, a,
+ b, sdim, alphar, alphai, beta, vsl, vsr, info, work );
+ return info;
+}
+
+// template function to call gges
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR,
+ typename Workspace >
+inline integer_t gges( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, MatrixA& a, MatrixB& b,
+ integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta, MatrixVSL& vsl,
+ MatrixVSR& vsr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gges_impl< value_type >::compute( jobvsl, jobvsr, sort, selctg, a,
+ b, sdim, alpha, beta, vsl, vsr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggesx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggesx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,413 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGESX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGESX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggesx( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, char const sense, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ integer_t& sdim, float* alphar, float* alphai, float* beta,
+ float* vsl, integer_t const ldvsl, float* vsr,
+ integer_t const ldvsr, float* rconde, float* rcondv, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ logical_t* bwork, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void ggesx( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, char const sense, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ integer_t& sdim, double* alphar, double* alphai, double* beta,
+ double* vsl, integer_t const ldvsl, double* vsr,
+ integer_t const ldvsr, double* rconde, double* rcondv,
+ double* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void ggesx( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, char const sense, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, integer_t& sdim, traits::complex_f* alpha,
+ traits::complex_f* beta, traits::complex_f* vsl,
+ integer_t const ldvsl, traits::complex_f* vsr,
+ integer_t const ldvsr, float* rconde, float* rcondv,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t* iwork, integer_t const liwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_CGGESX( &jobvsl, &jobvsr, &sort, &selctg, &sense, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &sdim, traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(vsl), &ldvsl, traits::complex_ptr(vsr),
+ &ldvsr, rconde, rcondv, traits::complex_ptr(work), &lwork,
+ rwork, iwork, &liwork, bwork, &info );
+ }
+ inline void ggesx( char const jobvsl, char const jobvsr, char const sort,
+ logical_t* selctg, char const sense, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, integer_t& sdim, traits::complex_d* alpha,
+ traits::complex_d* beta, traits::complex_d* vsl,
+ integer_t const ldvsl, traits::complex_d* vsr,
+ integer_t const ldvsr, double* rconde, double* rcondv,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t* iwork, integer_t const liwork, logical_t* bwork,
+ integer_t& info ) {
+ LAPACK_ZGGESX( &jobvsl, &jobvsr, &sort, &selctg, &sense, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &sdim, traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(vsl), &ldvsl, traits::complex_ptr(vsr),
+ &ldvsr, rconde, rcondv, traits::complex_ptr(work), &lwork,
+ rwork, iwork, &liwork, bwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggesx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggesx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR, typename VectorRCONDE, typename VectorRCONDV,
+ typename WORK, typename IWORK, typename BWORK >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixVSL& vsl,
+ MatrixVSR& vsr, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ integer_t& info, detail::workspace3< WORK, IWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvsl == 'N' || jobvsl == 'V' );
+ assert( jobvsr == 'N' || jobvsr == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alphar) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(alphai) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::ggesx( jobvsl, jobvsr, sort, selctg, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), sdim,
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR, typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixVSL& vsl,
+ MatrixVSR& vsr, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvsl, jobvsr, sort, selctg, sense, a, b, sdim, alphar,
+ alphai, beta, vsl, vsr, rconde, rcondv, info,
+ workspace( tmp_work, tmp_iwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR, typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixVSL& vsl,
+ MatrixVSR& vsr, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::ggesx( jobvsl, jobvsr, sort, selctg, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), sdim,
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv), &opt_size_work, -1,
+ &opt_size_iwork, -1, traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobvsl, jobvsr, sort, selctg, sense, a, b, sdim, alphar,
+ alphai, beta, vsl, vsr, rconde, rcondv, info,
+ workspace( tmp_work, tmp_iwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n, char const sense ) {
+ if ( n == 0 )
+ return 1;
+ if ( sense == 'N' )
+ return std::max( 8*n, 6*n+16 );
+ else
+ return std::max( 8*n, std::max( 6*n+16, n*n/2 ));
+ }
+
+ static integer_t min_size_iwork( integer_t const n, char const sense ) {
+ if ( sense == 'N' )
+ return 1;
+ else
+ return std::max( 1, n+6 );
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggesx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR,
+ typename VectorRCONDE, typename VectorRCONDV, typename WORK,
+ typename RWORK, typename IWORK, typename BWORK >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, integer_t& info, detail::workspace4< WORK,
+ RWORK, IWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvsl == 'N' || jobvsl == 'V' );
+ assert( jobvsr == 'N' || jobvsr == 'V' );
+ assert( sort == 'N' || sort == 'S' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a), sense )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ traits::matrix_size2(a), sort )));
+#endif
+ detail::ggesx( jobvsl, jobvsr, sort, selctg, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), sdim,
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a), sense ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ compute( jobvsl, jobvsr, sort, selctg, sense, a, b, sdim, alpha, beta,
+ vsl, vsr, rconde, rcondv, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ integer_t opt_size_iwork;
+ traits::detail::array< bool > tmp_bwork( min_size_bwork(
+ traits::matrix_size2(a), sort ) );
+ detail::ggesx( jobvsl, jobvsr, sort, selctg, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), sdim,
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vsl), traits::leading_dimension(vsl),
+ traits::matrix_storage(vsr), traits::leading_dimension(vsr),
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), &opt_size_iwork, -1,
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobvsl, jobvsr, sort, selctg, sense, a, b, sdim, alpha, beta,
+ vsl, vsr, rconde, rcondv, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n, char const sense ) {
+ if ( sense == 'N' )
+ return std::max( 1, 2*n );
+ else
+ return std::max( 1, std::max( 2*n, n*n/2 ) );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 8*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n, char const sense ) {
+ if ( sense == 'N' )
+ return 1;
+ else
+ return std::max( 1, n+2 );
+ }
+
+ static integer_t min_size_bwork( integer_t const n, char const sort ) {
+ if ( sort == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+
+// template function to call ggesx
+template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVSL,
+ typename MatrixVSR, typename VectorRCONDE, typename VectorRCONDV,
+ typename Workspace >
+inline integer_t ggesx( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHAR& alphar,
+ VectorALPHAI& alphai, VectorBETA& beta, MatrixVSL& vsl,
+ MatrixVSR& vsr, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggesx_impl< value_type >::compute( jobvsl, jobvsr, sort, selctg,
+ sense, a, b, sdim, alphar, alphai, beta, vsl, vsr, rconde, rcondv,
+ info, work );
+ return info;
+}
+
+// template function to call ggesx
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVSL, typename MatrixVSR,
+ typename VectorRCONDE, typename VectorRCONDV, typename Workspace >
+inline integer_t ggesx( char const jobvsl, char const jobvsr,
+ char const sort, logical_t* selctg, char const sense, MatrixA& a,
+ MatrixB& b, integer_t& sdim, VectorALPHA& alpha, VectorBETA& beta,
+ MatrixVSL& vsl, MatrixVSR& vsr, VectorRCONDE& rconde,
+ VectorRCONDV& rcondv, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggesx_impl< value_type >::compute( jobvsl, jobvsr, sort, selctg,
+ sense, a, b, sdim, alpha, beta, vsl, vsr, rconde, rcondv, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,285 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggev( char const jobvl, char const jobvr, integer_t const n,
+ float* a, integer_t const lda, float* b, integer_t const ldb,
+ float* alphar, float* alphai, float* beta, float* vl,
+ integer_t const ldvl, float* vr, integer_t const ldvr,
+ float* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_SGGEV( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alphar, alphai,
+ beta, vl, &ldvl, vr, &ldvr, work, &lwork, &info );
+ }
+ inline void ggev( char const jobvl, char const jobvr, integer_t const n,
+ double* a, integer_t const lda, double* b, integer_t const ldb,
+ double* alphar, double* alphai, double* beta, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DGGEV( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alphar, alphai,
+ beta, vl, &ldvl, vr, &ldvr, work, &lwork, &info );
+ }
+ inline void ggev( char const jobvl, char const jobvr, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* alpha,
+ traits::complex_f* beta, traits::complex_f* vl,
+ integer_t const ldvl, traits::complex_f* vr, integer_t const ldvr,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CGGEV( &jobvl, &jobvr, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(alpha),
+ traits::complex_ptr(beta), traits::complex_ptr(vl), &ldvl,
+ traits::complex_ptr(vr), &ldvr, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+ inline void ggev( char const jobvl, char const jobvr, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* alpha,
+ traits::complex_d* beta, traits::complex_d* vl,
+ integer_t const ldvl, traits::complex_d* vr, integer_t const ldvr,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZGGEV( &jobvl, &jobvr, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(alpha),
+ traits::complex_ptr(beta), traits::complex_ptr(vl), &ldvl,
+ traits::complex_ptr(vr), &ldvr, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggev_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggev_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename WORK >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alphar) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(alphai) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+#endif
+ detail::ggev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( jobvl, jobvr, a, b, alphar, alphai, beta, vl, vr, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ggev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvl, jobvr, a, b, alphar, alphai, beta, vl, vr, info,
+ workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 8*n );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggev_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename WORK, typename RWORK >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::ggev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( jobvl, jobvr, a, b, alpha, beta, vl, vr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR >
+ static void compute( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::ggev( jobvl, jobvr, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobvl, jobvr, a, b, alpha, beta, vl, vr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 8*n;
+ }
+};
+
+
+// template function to call ggev
+template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename Workspace >
+inline integer_t ggev( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
+ VectorBETA& beta, MatrixVL& vl, MatrixVR& vr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggev_impl< value_type >::compute( jobvl, jobvr, a, b, alphar,
+ alphai, beta, vl, vr, info, work );
+ return info;
+}
+
+// template function to call ggev
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename Workspace >
+inline integer_t ggev( char const jobvl, char const jobvr, MatrixA& a,
+ MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl,
+ MatrixVR& vr, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggev_impl< value_type >::compute( jobvl, jobvr, a, b, alpha, beta,
+ vl, vr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,454 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb, float* alphar,
+ float* alphai, float* beta, float* vl, integer_t const ldvl,
+ float* vr, integer_t const ldvr, integer_t& ilo, integer_t& ihi,
+ float* lscale, float* rscale, float& abnrm, float& bbnrm,
+ float* rconde, float* rcondv, float* work, integer_t const lwork,
+ integer_t* iwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void ggevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ double* alphar, double* alphai, double* beta, double* vl,
+ integer_t const ldvl, double* vr, integer_t const ldvr,
+ integer_t& ilo, integer_t& ihi, double* lscale, double* rscale,
+ double& abnrm, double& bbnrm, double* rconde, double* rcondv,
+ double* work, integer_t const lwork, integer_t* iwork,
+ logical_t* bwork, integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void ggevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* alpha, traits::complex_f* beta,
+ traits::complex_f* vl, integer_t const ldvl,
+ traits::complex_f* vr, integer_t const ldvr, integer_t& ilo,
+ integer_t& ihi, float* lscale, float* rscale, float& abnrm,
+ float& bbnrm, float* rconde, float* rcondv,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t* iwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_CGGEVX( &balanc, &jobvl, &jobvr, &sense, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &ilo, &ihi, lscale, rscale, &abnrm, &bbnrm, rconde,
+ rcondv, traits::complex_ptr(work), &lwork, rwork, iwork,
+ bwork, &info );
+ }
+ inline void ggevx( char const balanc, char const jobvl, char const jobvr,
+ char const sense, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* alpha, traits::complex_d* beta,
+ traits::complex_d* vl, integer_t const ldvl,
+ traits::complex_d* vr, integer_t const ldvr, integer_t& ilo,
+ integer_t& ihi, double* lscale, double* rscale, double& abnrm,
+ double& bbnrm, double* rconde, double* rcondv,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t* iwork, logical_t* bwork, integer_t& info ) {
+ LAPACK_ZGGEVX( &balanc, &jobvl, &jobvr, &sense, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(alpha), traits::complex_ptr(beta),
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr),
+ &ldvr, &ilo, &ihi, lscale, rscale, &abnrm, &bbnrm, rconde,
+ rcondv, traits::complex_ptr(work), &lwork, rwork, iwork,
+ bwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggevx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggevx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV, typename WORK,
+ typename IWORK, typename BWORK >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHAR& alphar, VectorALPHAI& alphai, VectorBETA& beta,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorLSCALE& lscale, VectorRSCALE& rscale, real_type& abnrm,
+ real_type& bbnrm, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ integer_t& info, detail::workspace3< WORK, IWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( balanc == 'N' || balanc == 'P' || balanc == 'S' ||
+ balanc == 'B' );
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alphar) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(alphai) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ balanc, jobvl, jobvr, sense, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( sense, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ sense, traits::matrix_size2(a) )));
+#endif
+ detail::ggevx( balanc, jobvl, jobvr, sense, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ ilo, ihi, traits::vector_storage(lscale),
+ traits::vector_storage(rscale), abnrm, bbnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHAR& alphar, VectorALPHAI& alphai, VectorBETA& beta,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorLSCALE& lscale, VectorRSCALE& rscale, real_type& abnrm,
+ real_type& bbnrm, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( balanc,
+ jobvl, jobvr, sense, traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( sense,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork( sense,
+ traits::matrix_size2(a) ) );
+ compute( balanc, jobvl, jobvr, sense, a, b, alphar, alphai, beta, vl,
+ vr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv,
+ info, workspace( tmp_work, tmp_iwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHAR& alphar, VectorALPHAI& alphai, VectorBETA& beta,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorLSCALE& lscale, VectorRSCALE& rscale, real_type& abnrm,
+ real_type& bbnrm, VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( sense,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork( sense,
+ traits::matrix_size2(a) ) );
+ detail::ggevx( balanc, jobvl, jobvr, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(alphar),
+ traits::vector_storage(alphai), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ ilo, ihi, traits::vector_storage(lscale),
+ traits::vector_storage(rscale), abnrm, bbnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv), &opt_size_work, -1,
+ traits::vector_storage(tmp_iwork),
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( balanc, jobvl, jobvr, sense, a, b, alphar, alphai, beta, vl,
+ vr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv,
+ info, workspace( tmp_work, tmp_iwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( char const balanc, char const jobvl,
+ char const jobvr, char const sense, integer_t const n ) {
+ if ( balanc == 'S' || balanc == 'B' || jobvl == 'V' || jobvr == 'V' )
+ return std::max( 1, 6*n );
+ if ( sense == 'E' )
+ return std::max( 1, 10*n );
+ if ( sense == 'V' || sense == 'B' )
+ return 2*n*n + 8*n + 16;
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_iwork( char const sense, integer_t const n ) {
+ if ( sense == 'E' )
+ return 0;
+ else
+ return n+6;
+ }
+
+ static integer_t min_size_bwork( char const sense, integer_t const n ) {
+ if ( sense == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggevx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV, typename WORK,
+ typename RWORK, typename IWORK, typename BWORK >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl, MatrixVR& vr,
+ integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, real_type& abnrm, real_type& bbnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv, integer_t& info,
+ detail::workspace4< WORK, RWORK, IWORK, BWORK > work ) {
+#ifndef NDEBUG
+ assert( balanc == 'N' || balanc == 'P' || balanc == 'S' ||
+ balanc == 'B' );
+ assert( jobvl == 'N' || jobvl == 'V' );
+ assert( jobvr == 'N' || jobvr == 'V' );
+ assert( sense == 'N' || sense == 'E' || sense == 'V' || sense == 'B' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(beta) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( sense, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( balanc, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( sense, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(bool()) >= min_size_bwork(
+ sense, traits::matrix_size2(a) )));
+#endif
+ detail::ggevx( balanc, jobvl, jobvr, sense, traits::matrix_size2(a),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(vl), traits::leading_dimension(vl),
+ traits::matrix_storage(vr), traits::leading_dimension(vr),
+ ilo, ihi, traits::vector_storage(lscale),
+ traits::vector_storage(rscale), abnrm, bbnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(work.select(bool())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl, MatrixVR& vr,
+ integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, real_type& abnrm, real_type& bbnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( sense,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( balanc,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( sense,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork( sense,
+ traits::matrix_size2(a) ) );
+ compute( balanc, jobvl, jobvr, sense, a, b, alpha, beta, vl, vr, ilo,
+ ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, info,
+ workspace( tmp_work, tmp_rwork, tmp_iwork, tmp_bwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV >
+ static void compute( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl, MatrixVR& vr,
+ integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale, real_type& abnrm, real_type& bbnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( balanc,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( sense,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< bool > tmp_bwork( min_size_bwork( sense,
+ traits::matrix_size2(a) ) );
+ detail::ggevx( balanc, jobvl, jobvr, sense,
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(alpha),
+ traits::vector_storage(beta), traits::matrix_storage(vl),
+ traits::leading_dimension(vl), traits::matrix_storage(vr),
+ traits::leading_dimension(vr), ilo, ihi,
+ traits::vector_storage(lscale),
+ traits::vector_storage(rscale), abnrm, bbnrm,
+ traits::vector_storage(rconde),
+ traits::vector_storage(rcondv), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_iwork),
+ traits::vector_storage(tmp_bwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( balanc, jobvl, jobvr, sense, a, b, alpha, beta, vl, vr, ilo,
+ ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, info,
+ workspace( tmp_work, tmp_rwork, tmp_iwork, tmp_bwork ) );
+ }
+
+ static integer_t min_size_work( char const sense, integer_t const n ) {
+ if ( sense == 'N' )
+ return std::max( 1, 2*n );
+ else {
+ if ( sense == 'E' )
+ return std::max( 1, 4*n );
+ else
+ return std::max( 1, 2*n*n+2*n );
+ }
+ }
+
+ static integer_t min_size_rwork( char const balanc, integer_t const n ) {
+ if ( balanc == 'S' || balanc == 'B' )
+ return std::max( 1, 6*n );
+ else
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_iwork( char const sense, integer_t const n ) {
+ if ( sense == 'E' )
+ return 0;
+ else
+ return n+2;
+ }
+
+ static integer_t min_size_bwork( char const sense, integer_t const n ) {
+ if ( sense == 'N' )
+ return 0;
+ else
+ return n;
+ }
+};
+
+
+// template function to call ggevx
+template< typename MatrixA, typename MatrixB, typename VectorALPHAR,
+ typename VectorALPHAI, typename VectorBETA, typename MatrixVL,
+ typename MatrixVR, typename VectorLSCALE, typename VectorRSCALE,
+ typename VectorRCONDE, typename VectorRCONDV, typename Workspace >
+inline integer_t ggevx( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHAR& alphar, VectorALPHAI& alphai, VectorBETA& beta,
+ MatrixVL& vl, MatrixVR& vr, integer_t& ilo, integer_t& ihi,
+ VectorLSCALE& lscale, VectorRSCALE& rscale,
+ typename traits::matrix_traits< MatrixA >::value_type& abnrm,
+ typename traits::matrix_traits< MatrixA >::value_type& bbnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggevx_impl< value_type >::compute( balanc, jobvl, jobvr, sense, a, b,
+ alphar, alphai, beta, vl, vr, ilo, ihi, lscale, rscale, abnrm,
+ bbnrm, rconde, rcondv, info, work );
+ return info;
+}
+
+// template function to call ggevx
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixVL, typename MatrixVR,
+ typename VectorLSCALE, typename VectorRSCALE, typename VectorRCONDE,
+ typename VectorRCONDV, typename Workspace >
+inline integer_t ggevx( char const balanc, char const jobvl,
+ char const jobvr, char const sense, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl, MatrixVR& vr,
+ integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
+ VectorRSCALE& rscale,
+ typename traits::matrix_traits< MatrixA >::value_type& abnrm,
+ typename traits::matrix_traits< MatrixA >::value_type& bbnrm,
+ VectorRCONDE& rconde, VectorRCONDV& rcondv,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggevx_impl< value_type >::compute( balanc, jobvl, jobvr, sense, a, b,
+ alpha, beta, vl, vr, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggglm.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggglm.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,232 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGGLM_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGGLM_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggglm( integer_t const n, integer_t const m,
+ integer_t const p, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* d, float* x, float* y, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGGGLM( &n, &m, &p, a, &lda, b, &ldb, d, x, y, work, &lwork,
+ &info );
+ }
+ inline void ggglm( integer_t const n, integer_t const m,
+ integer_t const p, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* d, double* x, double* y,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DGGGLM( &n, &m, &p, a, &lda, b, &ldb, d, x, y, work, &lwork,
+ &info );
+ }
+ inline void ggglm( integer_t const n, integer_t const m,
+ integer_t const p, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* d,
+ traits::complex_f* x, traits::complex_f* y,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGGGLM( &n, &m, &p, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(d),
+ traits::complex_ptr(x), traits::complex_ptr(y),
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void ggglm( integer_t const n, integer_t const m,
+ integer_t const p, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* d,
+ traits::complex_d* x, traits::complex_d* y,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGGGLM( &n, &m, &p, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(d),
+ traits::complex_ptr(x), traits::complex_ptr(y),
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggglm_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggglm_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY, typename WORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >=
+ traits::matrix_size1(b)-traits::matrix_size2(a) );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(d) >= traits::matrix_size1(b) );
+ assert( traits::vector_size(x) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(y) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a), traits::matrix_size1(b),
+ traits::matrix_size2(b) )));
+#endif
+ detail::ggglm( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(d),
+ traits::vector_storage(x), traits::vector_storage(y),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY >
+ static void compute( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a), traits::matrix_size1(b),
+ traits::matrix_size2(b) ) );
+ compute( a, b, d, x, y, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY >
+ static void compute( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::ggglm( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(d),
+ traits::vector_storage(x), traits::vector_storage(y),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, d, x, y, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const p ) {
+ return std::max( 1, n+m+p );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggglm_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY, typename WORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::matrix_size2(b) >=
+ traits::matrix_size1(b)-traits::matrix_size2(a) );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(d) >= traits::matrix_size1(b) );
+ assert( traits::vector_size(x) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(y) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a),
+ traits::matrix_size1(b), traits::matrix_size2(b) )));
+#endif
+ detail::ggglm( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(d),
+ traits::vector_storage(x), traits::vector_storage(y),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY >
+ static void compute( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a), traits::matrix_size1(b),
+ traits::matrix_size2(b) ) );
+ compute( a, b, d, x, y, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY >
+ static void compute( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::ggglm( traits::matrix_size1(b), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(d),
+ traits::vector_storage(x), traits::vector_storage(y),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, d, x, y, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const p ) {
+ return std::max( 1, n+m+p );
+ }
+};
+
+
+// template function to call ggglm
+template< typename MatrixA, typename MatrixB, typename VectorD,
+ typename VectorX, typename VectorY, typename Workspace >
+inline integer_t ggglm( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x,
+ VectorY& y, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggglm_impl< value_type >::compute( a, b, d, x, y, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gglse.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gglse.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,230 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGLSE_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGLSE_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gglse( integer_t const m, integer_t const n,
+ integer_t const p, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* c, float* d, float* x, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SGGLSE( &m, &n, &p, a, &lda, b, &ldb, c, d, x, work, &lwork,
+ &info );
+ }
+ inline void gglse( integer_t const m, integer_t const n,
+ integer_t const p, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* c, double* d, double* x,
+ double* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_DGGLSE( &m, &n, &p, a, &lda, b, &ldb, c, d, x, work, &lwork,
+ &info );
+ }
+ inline void gglse( integer_t const m, integer_t const n,
+ integer_t const p, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* c,
+ traits::complex_f* d, traits::complex_f* x,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CGGLSE( &m, &n, &p, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(c),
+ traits::complex_ptr(d), traits::complex_ptr(x),
+ traits::complex_ptr(work), &lwork, &info );
+ }
+ inline void gglse( integer_t const m, integer_t const n,
+ integer_t const p, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* c,
+ traits::complex_d* d, traits::complex_d* x,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZGGLSE( &m, &n, &p, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(c),
+ traits::complex_ptr(d), traits::complex_ptr(x),
+ traits::complex_ptr(work), &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gglse_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gglse_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX, typename WORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(c) >= traits::matrix_size1(a) );
+ assert( traits::vector_size(d) >= traits::matrix_size1(b) );
+ assert( traits::vector_size(x) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b) )));
+#endif
+ detail::gglse( traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(c),
+ traits::vector_storage(d), traits::vector_storage(x),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX >
+ static void compute( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b) ) );
+ compute( a, b, c, d, x, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX >
+ static void compute( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::gglse( traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(c),
+ traits::vector_storage(d), traits::vector_storage(x),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, c, d, x, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const p ) {
+ return std::max( 1, m+n+p );
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gglse_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX, typename WORK >
+ static void compute( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(c) >= traits::matrix_size1(a) );
+ assert( traits::vector_size(d) >= traits::matrix_size1(b) );
+ assert( traits::vector_size(x) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size1(a),
+ traits::matrix_size2(b), traits::matrix_size1(b) )));
+#endif
+ detail::gglse( traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(c),
+ traits::vector_storage(d), traits::vector_storage(x),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX >
+ static void compute( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b) ) );
+ compute( a, b, c, d, x, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX >
+ static void compute( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::gglse( traits::matrix_size1(a), traits::matrix_size2(b),
+ traits::matrix_size1(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::vector_storage(c),
+ traits::vector_storage(d), traits::vector_storage(x),
+ &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, b, c, d, x, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const m, integer_t const n,
+ integer_t const p ) {
+ return std::max( 1, m+n+p );
+ }
+};
+
+
+// template function to call gglse
+template< typename MatrixA, typename MatrixB, typename VectorC,
+ typename VectorD, typename VectorX, typename Workspace >
+inline integer_t gglse( MatrixA& a, MatrixB& b, VectorC& c, VectorD& d,
+ VectorX& x, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ gglse_impl< value_type >::compute( a, b, c, d, x, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggsvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ggsvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,292 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GGSVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GGSVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ggsvd( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const n, integer_t const p,
+ integer_t& k, integer_t& l, float* a, integer_t const lda,
+ float* b, integer_t const ldb, float* alpha, float* beta,
+ float* u, integer_t const ldu, float* v, integer_t const ldv,
+ float* q, integer_t const ldq, float* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_SGGSVD( &jobu, &jobv, &jobq, &m, &n, &p, &k, &l, a, &lda, b,
+ &ldb, alpha, beta, u, &ldu, v, &ldv, q, &ldq, work, iwork,
+ &info );
+ }
+ inline void ggsvd( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const n, integer_t const p,
+ integer_t& k, integer_t& l, double* a, integer_t const lda,
+ double* b, integer_t const ldb, double* alpha, double* beta,
+ double* u, integer_t const ldu, double* v, integer_t const ldv,
+ double* q, integer_t const ldq, double* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_DGGSVD( &jobu, &jobv, &jobq, &m, &n, &p, &k, &l, a, &lda, b,
+ &ldb, alpha, beta, u, &ldu, v, &ldv, q, &ldq, work, iwork,
+ &info );
+ }
+ inline void ggsvd( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const n, integer_t const p,
+ integer_t& k, integer_t& l, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ float* alpha, float* beta, traits::complex_f* u,
+ integer_t const ldu, traits::complex_f* v, integer_t const ldv,
+ traits::complex_f* q, integer_t const ldq,
+ traits::complex_f* work, float* rwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_CGGSVD( &jobu, &jobv, &jobq, &m, &n, &p, &k, &l,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ alpha, beta, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(v), &ldv, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(work), rwork, iwork, &info );
+ }
+ inline void ggsvd( char const jobu, char const jobv, char const jobq,
+ integer_t const m, integer_t const n, integer_t const p,
+ integer_t& k, integer_t& l, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ double* alpha, double* beta, traits::complex_d* u,
+ integer_t const ldu, traits::complex_d* v, integer_t const ldv,
+ traits::complex_d* q, integer_t const ldq,
+ traits::complex_d* work, double* rwork, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_ZGGSVD( &jobu, &jobv, &jobq, &m, &n, &p, &k, &l,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ alpha, beta, traits::complex_ptr(u), &ldu,
+ traits::complex_ptr(v), &ldv, traits::complex_ptr(q), &ldq,
+ traits::complex_ptr(work), rwork, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ggsvd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ggsvd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ, typename WORK, typename IWORK >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'U' || jobu == 'N' );
+ assert( jobv == 'V' || jobv == 'N' );
+ assert( jobq == 'Q' || jobq == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(b), traits::matrix_size1(a),
+ traits::matrix_size1(b) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(b) )));
+#endif
+ detail::ggsvd( jobu, jobv, jobq, traits::matrix_size1(a),
+ traits::matrix_size2(b), traits::matrix_size1(b), k, l,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(v), traits::leading_dimension(v),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(b), traits::matrix_size1(a),
+ traits::matrix_size1(b) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(b) ) );
+ compute( jobu, jobv, jobq, k, l, a, b, alpha, beta, u, v, q, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( jobu, jobv, jobq, k, l, a, b, alpha, beta, u, v, q, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const m,
+ integer_t const p ) {
+ return std::max(3*n,std::max(m,p))+n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ggsvd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ, typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& info, detail::workspace3< WORK, RWORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobu == 'U' || jobu == 'N' );
+ assert( jobv == 'V' || jobv == 'N' );
+ assert( jobq == 'Q' || jobq == 'N' );
+ assert( traits::matrix_size1(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::matrix_size1(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size1(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size1(b)) );
+ assert( traits::vector_size(alpha) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(b),
+ traits::matrix_size1(a), traits::matrix_size1(b) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(b) )));
+#endif
+ detail::ggsvd( jobu, jobv, jobq, traits::matrix_size1(a),
+ traits::matrix_size2(b), traits::matrix_size1(b), k, l,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(alpha), traits::vector_storage(beta),
+ traits::matrix_storage(u), traits::leading_dimension(u),
+ traits::matrix_storage(v), traits::leading_dimension(v),
+ traits::matrix_storage(q), traits::leading_dimension(q),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(b), traits::matrix_size1(a),
+ traits::matrix_size1(b) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(b) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(b) ) );
+ compute( jobu, jobv, jobq, k, l, a, b, alpha, beta, u, v, q, info,
+ workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ >
+ static void compute( char const jobu, char const jobv, char const jobq,
+ integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, integer_t& info, optimal_workspace work ) {
+ compute( jobu, jobv, jobq, k, l, a, b, alpha, beta, u, v, q, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const m,
+ integer_t const p ) {
+ return std::max(3*n,std::max(m,p))+n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call ggsvd
+template< typename MatrixA, typename MatrixB, typename VectorALPHA,
+ typename VectorBETA, typename MatrixU, typename MatrixV,
+ typename MatrixQ, typename Workspace >
+inline integer_t ggsvd( char const jobu, char const jobv,
+ char const jobq, integer_t& k, integer_t& l, MatrixA& a, MatrixB& b,
+ VectorALPHA& alpha, VectorBETA& beta, MatrixU& u, MatrixV& v,
+ MatrixQ& q, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ ggsvd_impl< value_type >::compute( jobu, jobv, jobq, k, l, a, b,
+ alpha, beta, u, v, q, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GTSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GTSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gtsv( integer_t const n, integer_t const nrhs, float* dl,
+ float* d, float* du, float* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_SGTSV( &n, &nrhs, dl, d, du, b, &ldb, &info );
+ }
+ inline void gtsv( integer_t const n, integer_t const nrhs, double* dl,
+ double* d, double* du, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DGTSV( &n, &nrhs, dl, d, du, b, &ldb, &info );
+ }
+ inline void gtsv( integer_t const n, integer_t const nrhs,
+ traits::complex_f* dl, traits::complex_f* d,
+ traits::complex_f* du, traits::complex_f* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_CGTSV( &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void gtsv( integer_t const n, integer_t const nrhs,
+ traits::complex_d* dl, traits::complex_d* d,
+ traits::complex_d* du, traits::complex_d* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_ZGTSV( &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct gtsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename MatrixB >
+ static void compute( integer_t const n, VectorDL& dl, VectorD& d,
+ VectorDU& du, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(dl) >= n-1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(du) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::gtsv( n, traits::matrix_size2(b), traits::vector_storage(dl),
+ traits::vector_storage(d), traits::vector_storage(du),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call gtsv
+template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename MatrixB >
+inline integer_t gtsv( integer_t const n, VectorDL& dl, VectorD& d,
+ VectorDU& du, MatrixB& b ) {
+ typedef typename traits::vector_traits< VectorDL >::value_type value_type;
+ integer_t info(0);
+ gtsv_impl< value_type >::compute( n, dl, d, du, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,290 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_GTSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_GTSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void gtsvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, float* dl, float* d, float* du, float* dlf,
+ float* df, float* duf, float* du2, integer_t* ipiv, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float& rcond,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_SGTSVX( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b, &ldb, x, &ldx, &rcond, ferr, berr, work, iwork,
+ &info );
+ }
+ inline void gtsvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, double* dl, double* d, double* du,
+ double* dlf, double* df, double* duf, double* du2,
+ integer_t* ipiv, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DGTSVX( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b, &ldb, x, &ldx, &rcond, ferr, berr, work, iwork,
+ &info );
+ }
+ inline void gtsvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_f* dl, traits::complex_f* d,
+ traits::complex_f* du, traits::complex_f* dlf,
+ traits::complex_f* df, traits::complex_f* duf,
+ traits::complex_f* du2, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CGTSVX( &fact, &trans, &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(dlf), traits::complex_ptr(df),
+ traits::complex_ptr(duf), traits::complex_ptr(du2), ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void gtsvx( char const fact, char const trans, integer_t const n,
+ integer_t const nrhs, traits::complex_d* dl, traits::complex_d* d,
+ traits::complex_d* du, traits::complex_d* dlf,
+ traits::complex_d* df, traits::complex_d* duf,
+ traits::complex_d* du2, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZGTSVX( &fact, &trans, &n, &nrhs, traits::complex_ptr(dl),
+ traits::complex_ptr(d), traits::complex_ptr(du),
+ traits::complex_ptr(dlf), traits::complex_ptr(df),
+ traits::complex_ptr(duf), traits::complex_ptr(du2), ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct gtsvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct gtsvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename IWORK >
+ static void compute( char const fact, char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(dl) >= n-1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(du) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::gtsvx( fact, trans, n, traits::matrix_size2(b),
+ traits::vector_storage(dl), traits::vector_storage(d),
+ traits::vector_storage(du), traits::vector_storage(dlf),
+ traits::vector_storage(df), traits::vector_storage(duf),
+ traits::vector_storage(du2), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( fact, trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
+ rcond, ferr, berr, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( fact, trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
+ rcond, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct gtsvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename WORK, typename RWORK >
+ static void compute( char const fact, char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( trans == 'N' || trans == 'T' || trans == 'C' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(dl) >= n-1 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(du) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(b) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::gtsvx( fact, trans, n, traits::matrix_size2(b),
+ traits::vector_storage(dl), traits::vector_storage(d),
+ traits::vector_storage(du), traits::vector_storage(dlf),
+ traits::vector_storage(df), traits::vector_storage(duf),
+ traits::vector_storage(du2), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( fact, trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
+ rcond, ferr, berr, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, char const trans, integer_t const n,
+ VectorDL& dl, VectorD& d, VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, integer_t& info, optimal_workspace work ) {
+ compute( fact, trans, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
+ rcond, ferr, berr, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call gtsvx
+template< typename VectorDL, typename VectorD, typename VectorDU,
+ typename VectorDLF, typename VectorDF, typename VectorDUF,
+ typename VectorDU2, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename VectorFERR, typename VectorBERR,
+ typename Workspace >
+inline integer_t gtsvx( char const fact, char const trans,
+ integer_t const n, VectorDL& dl, VectorD& d, VectorDU& du,
+ VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ typename traits::vector_traits< VectorDL >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorDL >::value_type value_type;
+ integer_t info(0);
+ gtsvx_impl< value_type >::compute( fact, trans, n, dl, d, du, dlf,
+ df, duf, du2, ipiv, b, x, rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbev( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, traits::complex_f* ab, integer_t const ldab,
+ float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CHBEV( &jobz, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
+ w, traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ rwork, &info );
+ }
+ inline void hbev( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, traits::complex_d* ab, integer_t const ldab,
+ double* w, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZHBEV( &jobz, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
+ w, traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename WORK, typename RWORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hbev( jobz, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( jobz, n, kd, ab, w, z, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, n, kd, ab, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return std::max(1,3*n-2);
+ }
+};
+
+
+// template function to call hbev
+template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t hbev( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbev_impl< value_type >::compute( jobz, n, kd, ab, w, z, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,179 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbevd( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, traits::complex_f* ab, integer_t const ldab,
+ float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_CHBEVD( &jobz, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
+ w, traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+ inline void hbevd( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, traits::complex_d* ab, integer_t const ldab,
+ double* w, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_ZHBEVD( &jobz, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
+ w, traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( jobz, n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::hbevd( jobz, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, kd, ab, w, z, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::hbevd( jobz, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_rwork, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, kd, ab, w, z, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 2*n*n;
+ }
+ }
+
+ static integer_t min_size_rwork( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call hbevd
+template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t hbevd( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbevd_impl< value_type >::compute( jobz, n, kd, ab, w, z, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,168 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbevx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const kd, traits::complex_f* ab,
+ integer_t const ldab, traits::complex_f* q, integer_t const ldq,
+ float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, integer_t& m, float* w,
+ traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, float* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_CHBEVX( &jobz, &range, &uplo, &n, &kd, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(q), &ldq, &vl, &vu, &il, &iu,
+ &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+ inline void hbevx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const kd, traits::complex_d* ab,
+ integer_t const ldab, traits::complex_d* q, integer_t const ldq,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, double* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_ZHBEVX( &jobz, &range, &uplo, &n, &kd, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(q), &ldq, &vl, &vu, &il, &iu,
+ &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename RWORK, typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixQ& q, real_type const vl,
+ real_type const vu, integer_t const il, integer_t const iu,
+ real_type const abstol, integer_t& m, VectorW& w, MatrixZ& z,
+ VectorIFAIL& ifail, integer_t& info, detail::workspace3< WORK,
+ RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd );
+ assert( traits::leading_dimension(q) >= std::max(1,n) );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::hbevx( jobz, range, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(q), traits::leading_dimension(q), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixQ& q, real_type const vl,
+ real_type const vu, integer_t const il, integer_t const iu,
+ real_type const abstol, integer_t& m, VectorW& w, MatrixZ& z,
+ VectorIFAIL& ifail, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, kd, ab, q, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixQ& q, real_type const vl,
+ real_type const vu, integer_t const il, integer_t const iu,
+ real_type const abstol, integer_t& m, VectorW& w, MatrixZ& z,
+ VectorIFAIL& ifail, integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, kd, ab, q, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call hbevx
+template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t hbevx( char const jobz, char const range,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixQ& q,
+ typename traits::matrix_traits< MatrixAB >::value_type const vl,
+ typename traits::matrix_traits< MatrixAB >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAB >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbevx_impl< value_type >::compute( jobz, range, n, kd, ab, q, vl, vu,
+ il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,141 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbgv( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, traits::complex_f* ab,
+ integer_t const ldab, traits::complex_f* bb, integer_t const ldbb,
+ float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CHBGV( &jobz, &uplo, &n, &ka, &kb, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(bb), &ldbb, w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ rwork, &info );
+ }
+ inline void hbgv( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, traits::complex_d* ab,
+ integer_t const ldab, traits::complex_d* bb, integer_t const ldbb,
+ double* w, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZHBGV( &jobz, &uplo, &n, &ka, &kb, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(bb), &ldbb, w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbgv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename WORK, typename RWORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= 0 );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hbgv( jobz, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ optimal_workspace work ) {
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 3*n;
+ }
+};
+
+
+// template function to call hbgv
+template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t hbgv( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab, MatrixBB& bb,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbgv_impl< value_type >::compute( jobz, n, ka, kb, ab, bb, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,192 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBGVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBGVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbgvd( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, traits::complex_f* ab,
+ integer_t const ldab, traits::complex_f* bb, integer_t const ldbb,
+ float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_CHBGVD( &jobz, &uplo, &n, &ka, &kb, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(bb), &ldbb, w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+ inline void hbgvd( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, traits::complex_d* ab,
+ integer_t const ldab, traits::complex_d* bb, integer_t const ldbb,
+ double* w, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_ZHBGVD( &jobz, &uplo, &n, &ka, &kb, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(bb), &ldbb, w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbgvd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= 0 );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( jobz, n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::hbgvd( jobz, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::hbgvd( jobz, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_rwork, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 2*n*n;
+ }
+ }
+
+ static integer_t min_size_rwork( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call hbgvd
+template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t hbgvd( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab, MatrixBB& bb,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbgvd_impl< value_type >::compute( jobz, n, ka, kb, ab, bb, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbgvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,178 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HBGVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HBGVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hbgvx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const ka, integer_t const kb,
+ traits::complex_f* ab, integer_t const ldab,
+ traits::complex_f* bb, integer_t const ldbb, traits::complex_f* q,
+ integer_t const ldq, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, float* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_CHBGVX( &jobz, &range, &uplo, &n, &ka, &kb,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(bb),
+ &ldbb, traits::complex_ptr(q), &ldq, &vl, &vu, &il, &iu,
+ &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+ inline void hbgvx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const ka, integer_t const kb,
+ traits::complex_d* ab, integer_t const ldab,
+ traits::complex_d* bb, integer_t const ldbb, traits::complex_d* q,
+ integer_t const ldq, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, traits::complex_d* z,
+ integer_t const ldz, traits::complex_d* work, double* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_ZHBGVX( &jobz, &range, &uplo, &n, &ka, &kb,
+ traits::complex_ptr(ab), &ldab, traits::complex_ptr(bb),
+ &ldbb, traits::complex_ptr(q), &ldq, &vl, &vu, &il, &iu,
+ &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hbgvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= 0 );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::hbgvx( jobz, range, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::matrix_storage(q), traits::leading_dimension(q), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, ka, kb, ab, bb, q, vl, vu, il, iu, abstol, m,
+ w, z, ifail, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, ka, kb, ab, bb, q, vl, vu, il, iu, abstol, m,
+ w, z, ifail, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call hbgvx
+template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL,
+ typename Workspace >
+inline integer_t hbgvx( char const jobz, char const range,
+ integer_t const n, integer_t const ka, integer_t const kb,
+ MatrixAB& ab, MatrixBB& bb, MatrixQ& q,
+ typename traits::matrix_traits< MatrixAB >::value_type const vl,
+ typename traits::matrix_traits< MatrixAB >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAB >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ hbgvx_impl< value_type >::compute( jobz, range, n, ka, kb, ab, bb, q,
+ vl, vu, il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,132 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void heev( char const jobz, char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float* w,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CHEEV( &jobz, &uplo, &n, traits::complex_ptr(a), &lda, w,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void heev( char const jobz, char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double* w,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZHEEV( &jobz, &uplo, &n, traits::complex_ptr(a), &lda, w,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct heev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename WORK,
+ typename RWORK >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::heev( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( jobz, a, w, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::heev( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobz, a, w, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n-1 );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return std::max( 1, 3*n-2 );
+ }
+};
+
+
+// template function to call heev
+template< typename MatrixA, typename VectorW, typename Workspace >
+inline integer_t heev( char const jobz, MatrixA& a, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ heev_impl< value_type >::compute( jobz, a, w, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,170 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void heevd( char const jobz, char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, float* w,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_CHEEVD( &jobz, &uplo, &n, traits::complex_ptr(a), &lda, w,
+ traits::complex_ptr(work), &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ }
+ inline void heevd( char const jobz, char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, double* w,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_ZHEEVD( &jobz, &uplo, &n, traits::complex_ptr(a), &lda, w,
+ traits::complex_ptr(work), &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct heevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename WORK,
+ typename RWORK, typename IWORK >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( jobz, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( jobz, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, traits::matrix_size2(a) )));
+#endif
+ detail::heevd( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( jobz,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( jobz,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ traits::matrix_size2(a) ) );
+ compute( jobz, a, w, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::heevd( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ &opt_size_work, -1, &opt_size_rwork, -1, &opt_size_iwork, -1,
+ info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, a, w, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n+1;
+ else
+ return 2*n + n*n;
+ }
+ }
+
+ static integer_t min_size_rwork( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call heevd
+template< typename MatrixA, typename VectorW, typename Workspace >
+inline integer_t heevd( char const jobz, MatrixA& a, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ heevd_impl< value_type >::compute( jobz, a, w, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,187 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEEVR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEEVR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void heevr( char const jobz, char const range, char const uplo,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, integer_t& m, float* w,
+ traits::complex_f* z, integer_t const ldz, integer_t* isuppz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_CHEEVR( &jobz, &range, &uplo, &n, traits::complex_ptr(a), &lda,
+ &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z),
+ &ldz, isuppz, traits::complex_ptr(work), &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ }
+ inline void heevr( char const jobz, char const range, char const uplo,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ traits::complex_d* z, integer_t const ldz, integer_t* isuppz,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t const lrwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_ZHEEVR( &jobz, &range, &uplo, &n, traits::complex_ptr(a), &lda,
+ &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z),
+ &ldz, isuppz, traits::complex_ptr(work), &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct heevr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ, typename WORK, typename RWORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(isuppz) >= 2*std::max(1,m) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::heevr( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, isuppz,
+ info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::heevr( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ &opt_size_work, -1, &opt_size_rwork, -1, &opt_size_iwork, -1,
+ info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, isuppz,
+ info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return std::max( 1, 24*n );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return std::max( 1, 10*n );
+ }
+};
+
+
+// template function to call heevr
+template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ, typename Workspace >
+inline integer_t heevr( char const jobz, char const range, MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const vl,
+ typename traits::matrix_traits< MatrixA >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixA >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ heevr_impl< value_type >::compute( jobz, range, a, vl, vu, il, iu,
+ abstol, m, w, z, isuppz, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/heevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,183 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void heevx( char const jobz, char const range, char const uplo,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, integer_t& m, float* w,
+ traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_CHEEVX( &jobz, &range, &uplo, &n, traits::complex_ptr(a), &lda,
+ &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z),
+ &ldz, traits::complex_ptr(work), &lwork, rwork, iwork, ifail,
+ &info );
+ }
+ inline void heevx( char const jobz, char const range, char const uplo,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_ZHEEVX( &jobz, &range, &uplo, &n, traits::complex_ptr(a), &lda,
+ &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z),
+ &ldz, traits::complex_ptr(work), &lwork, rwork, iwork, ifail,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct heevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename WORK, typename RWORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::heevx( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, ifail, info,
+ workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ detail::heevx( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_iwork),
+ traits::vector_storage(ifail), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, ifail, info,
+ workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call heevx
+template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename Workspace >
+inline integer_t heevx( char const jobz, char const range, MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const vl,
+ typename traits::matrix_traits< MatrixA >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixA >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ heevx_impl< value_type >::compute( jobz, range, a, vl, vu, il, iu,
+ abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,143 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hegv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, float* w,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CHEGV( &itype, &jobz, &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, w, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+ inline void hegv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, double* w,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZHEGV( &itype, &jobz, &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, w, traits::complex_ptr(work),
+ &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hegv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename WORK, typename RWORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hegv( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ detail::hegv( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w), &opt_size_work, -1,
+ traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n-1 );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return std::max( 1, 3*n-2 );
+ }
+};
+
+
+// template function to call hegv
+template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename Workspace >
+inline integer_t hegv( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hegv_impl< value_type >::compute( itype, jobz, n, a, b, w, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,179 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEGVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEGVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hegvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, traits::complex_f* a,
+ integer_t const lda, traits::complex_f* b, integer_t const ldb,
+ float* w, traits::complex_f* work, integer_t const lwork,
+ float* rwork, integer_t const lrwork, integer_t* iwork,
+ integer_t const liwork, integer_t& info ) {
+ LAPACK_CHEGVD( &itype, &jobz, &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, w, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+ inline void hegvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, traits::complex_d* a,
+ integer_t const lda, traits::complex_d* b, integer_t const ldb,
+ double* w, traits::complex_d* work, integer_t const lwork,
+ double* rwork, integer_t const lrwork, integer_t* iwork,
+ integer_t const liwork, integer_t& info ) {
+ LAPACK_ZHEGVD( &itype, &jobz, &uplo, &n, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, w, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hegvd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( jobz, n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::hegvd( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::hegvd( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w), &opt_size_work, -1,
+ &opt_size_rwork, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n+1;
+ else
+ return 2*n + n*n;
+ }
+ }
+
+ static integer_t min_size_rwork( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call hegvd
+template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename Workspace >
+inline integer_t hegvd( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hegvd_impl< value_type >::compute( itype, jobz, n, a, b, w, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hegvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,187 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HEGVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HEGVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hegvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n,
+ traits::complex_f* a, integer_t const lda, traits::complex_f* b,
+ integer_t const ldb, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_CHEGVX( &itype, &jobz, &range, &uplo, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z),
+ &ldz, traits::complex_ptr(work), &lwork, rwork, iwork, ifail,
+ &info );
+ }
+ inline void hegvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n,
+ traits::complex_d* a, integer_t const lda, traits::complex_d* b,
+ integer_t const ldb, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, traits::complex_d* z,
+ integer_t const ldz, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_ZHEGVX( &itype, &jobz, &range, &uplo, &n,
+ traits::complex_ptr(a), &lda, traits::complex_ptr(b), &ldb,
+ &vl, &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z),
+ &ldz, traits::complex_ptr(work), &lwork, rwork, iwork, ifail,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hegvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename RWORK, typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::hegvx( itype, jobz, range, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( itype, jobz, range, n, a, b, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ detail::hegvx( itype, jobz, range, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork),
+ traits::vector_storage(tmp_iwork),
+ traits::vector_storage(ifail), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( itype, jobz, range, n, a, b, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call hegvx
+template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t hegvx( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ typename traits::matrix_traits< MatrixA >::value_type const vl,
+ typename traits::matrix_traits< MatrixA >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixA >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hegvx_impl< value_type >::compute( itype, jobz, range, n, a, b, vl,
+ vu, il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hesv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hesv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,127 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HESV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HESV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hesv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CHESV( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+ inline void hesv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZHESV( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hesv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( )));
+#endif
+ detail::hesv( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( ) );
+ compute( a, ipiv, b, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::hesv( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, b, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( ) {
+ return 1;
+ }
+};
+
+
+// template function to call hesv
+template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename Workspace >
+inline integer_t hesv( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hesv_impl< value_type >::compute( a, ipiv, b, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hesvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hesvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,179 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HESVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HESVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hesvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CHESVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void hesvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZHESVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hesvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::hesvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, a, af, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::hesvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( fact, a, af, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hesvx
+template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t hesvx( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ hesvx_impl< value_type >::compute( fact, a, af, ipiv, b, x, rcond,
+ ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpev( char const jobz, char const uplo, integer_t const n,
+ traits::complex_f* ap, float* w, traits::complex_f* z,
+ integer_t const ldz, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CHPEV( &jobz, &uplo, &n, traits::complex_ptr(ap), w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ rwork, &info );
+ }
+ inline void hpev( char const jobz, char const uplo, integer_t const n,
+ traits::complex_d* ap, double* w, traits::complex_d* z,
+ integer_t const ldz, traits::complex_d* work, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZHPEV( &jobz, &uplo, &n, traits::complex_ptr(ap), w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename WORK, typename RWORK >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hpev( jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( jobz, n, ap, w, z, info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( jobz, n, ap, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max(1,2*n-1);
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return std::max(1,3*n-2);
+ }
+};
+
+
+// template function to call hpev
+template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t hpev( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpev_impl< value_type >::compute( jobz, n, ap, w, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,170 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpevd( char const jobz, char const uplo, integer_t const n,
+ traits::complex_f* ap, float* w, traits::complex_f* z,
+ integer_t const ldz, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t const lrwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_CHPEVD( &jobz, &uplo, &n, traits::complex_ptr(ap), w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+ inline void hpevd( char const jobz, char const uplo, integer_t const n,
+ traits::complex_d* ap, double* w, traits::complex_d* z,
+ integer_t const ldz, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t const lrwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_ZHPEVD( &jobz, &uplo, &n, traits::complex_ptr(ap), w,
+ traits::complex_ptr(z), &ldz, traits::complex_ptr(work),
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, detail::workspace3< WORK,
+ RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( jobz, n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::hpevd( jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, ap, w, z, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::hpevd( jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ &opt_size_work, -1, &opt_size_rwork, -1, &opt_size_iwork, -1,
+ info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, ap, w, z, info, workspace( tmp_work, tmp_rwork,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 2*n;
+ }
+ }
+
+ static integer_t min_size_rwork( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call hpevd
+template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t hpevd( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpevd_impl< value_type >::compute( jobz, n, ap, w, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,157 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpevx( char const jobz, char const range, char const uplo,
+ integer_t const n, traits::complex_f* ap, float const vl,
+ float const vu, integer_t const il, integer_t const iu,
+ float const abstol, integer_t& m, float* w, traits::complex_f* z,
+ integer_t const ldz, traits::complex_f* work, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_CHPEVX( &jobz, &range, &uplo, &n, traits::complex_ptr(ap), &vl,
+ &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+ inline void hpevx( char const jobz, char const range, char const uplo,
+ integer_t const n, traits::complex_d* ap, double const vl,
+ double const vu, integer_t const il, integer_t const iu,
+ double const abstol, integer_t& m, double* w,
+ traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, double* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_ZHPEVX( &jobz, &range, &uplo, &n, traits::complex_ptr(ap), &vl,
+ &vu, &il, &iu, &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename WORK, typename RWORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ MatrixAP& ap, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::hpevx( jobz, range, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ MatrixAP& ap, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, ap, vl, vu, il, iu, abstol, m, w, z, ifail,
+ info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ MatrixAP& ap, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, ap, vl, vu, il, iu, abstol, m, w, z, ifail,
+ info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call hpevx
+template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename Workspace >
+inline integer_t hpevx( char const jobz, char const range,
+ integer_t const n, MatrixAP& ap,
+ typename traits::matrix_traits< MatrixAP >::value_type const vl,
+ typename traits::matrix_traits< MatrixAP >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAP >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpevx_impl< value_type >::compute( jobz, range, n, ap, vl, vu, il,
+ iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,130 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpgv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, traits::complex_f* ap, traits::complex_f* bp,
+ float* w, traits::complex_f* z, integer_t const ldz,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CHPGV( &itype, &jobz, &uplo, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(bp), w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void hpgv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, traits::complex_d* ap, traits::complex_d* bp,
+ double* w, traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZHPGV( &itype, &jobz, &uplo, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(bp), w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpgv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename WORK, typename RWORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, detail::workspace2< WORK,
+ RWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hpgv( itype, jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( itype, jobz, n, ap, bp, w, z, info, workspace( tmp_work,
+ tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( itype, jobz, n, ap, bp, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max(1,2*n-1);
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return std::max(1,3*n-2);
+ }
+};
+
+
+// template function to call hpgv
+template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t hpgv( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpgv_impl< value_type >::compute( itype, jobz, n, ap, bp, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,182 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPGVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPGVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpgvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, traits::complex_f* ap,
+ traits::complex_f* bp, float* w, traits::complex_f* z,
+ integer_t const ldz, traits::complex_f* work,
+ integer_t const lwork, float* rwork, integer_t const lrwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_CHPGVD( &itype, &jobz, &uplo, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(bp), w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ }
+ inline void hpgvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, traits::complex_d* ap,
+ traits::complex_d* bp, double* w, traits::complex_d* z,
+ integer_t const ldz, traits::complex_d* work,
+ integer_t const lwork, double* rwork, integer_t const lrwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_ZHPGVD( &itype, &jobz, &uplo, &n, traits::complex_ptr(ap),
+ traits::complex_ptr(bp), w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpgvd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename WORK, typename RWORK, typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, detail::workspace3< WORK, RWORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( jobz, n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::hpgvd( itype, jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( itype, jobz, n, ap, bp, w, z, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ real_type opt_size_rwork;
+ integer_t opt_size_iwork;
+ detail::hpgvd( itype, jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_rwork, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< real_type > tmp_rwork(
+ traits::detail::to_int( opt_size_rwork ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( itype, jobz, n, ap, bp, w, z, info, workspace( tmp_work,
+ tmp_rwork, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 2*n;
+ }
+ }
+
+ static integer_t min_size_rwork( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call hpgvd
+template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t hpgvd( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpgvd_impl< value_type >::compute( itype, jobz, n, ap, bp, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpgvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,165 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPGVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPGVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpgvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n,
+ traits::complex_f* ap, traits::complex_f* bp, float const vl,
+ float const vu, integer_t const il, integer_t const iu,
+ float const abstol, integer_t& m, float* w, traits::complex_f* z,
+ integer_t const ldz, traits::complex_f* work, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_CHPGVX( &itype, &jobz, &range, &uplo, &n,
+ traits::complex_ptr(ap), traits::complex_ptr(bp), &vl, &vu,
+ &il, &iu, &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+ inline void hpgvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n,
+ traits::complex_d* ap, traits::complex_d* bp, double const vl,
+ double const vu, integer_t const il, integer_t const iu,
+ double const abstol, integer_t& m, double* w,
+ traits::complex_d* z, integer_t const ldz,
+ traits::complex_d* work, double* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_ZHPGVX( &itype, &jobz, &range, &uplo, &n,
+ traits::complex_ptr(ap), traits::complex_ptr(bp), &vl, &vu,
+ &il, &iu, &abstol, &m, w, traits::complex_ptr(z), &ldz,
+ traits::complex_ptr(work), rwork, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpgvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename RWORK, typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::hpgvx( itype, jobz, range, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( itype, jobz, range, n, ap, bp, vl, vu, il, iu, abstol, m, w,
+ z, ifail, info, workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ optimal_workspace work ) {
+ compute( itype, jobz, range, n, ap, bp, vl, vu, il, iu, abstol, m, w,
+ z, ifail, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call hpgvx
+template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t hpgvx( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ typename traits::matrix_traits< MatrixAP >::value_type const vl,
+ typename traits::matrix_traits< MatrixAP >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAP >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpgvx_impl< value_type >::compute( itype, jobz, range, n, ap, bp, vl,
+ vu, il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,84 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpsv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CHPSV( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void hpsv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZHPSV( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixAP& ap, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+#endif
+ detail::hpsv( traits::matrix_uplo_tag(ap), traits::matrix_size2(ap),
+ traits::matrix_size2(b), traits::matrix_storage(ap),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call hpsv
+template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+inline integer_t hpsv( MatrixAP& ap, VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpsv_impl< value_type >::compute( ap, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hpsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,152 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_HPSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_HPSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void hpsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* afp, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CHPSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void hpsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* afp, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZHPSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct hpsvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, integer_t const n, MatrixAP& ap,
+ MatrixAFP& afp, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::hpsvx( fact, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_size2(x), traits::matrix_storage(ap),
+ traits::matrix_storage(afp), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, integer_t const n, MatrixAP& ap,
+ MatrixAFP& afp, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( fact, n, ap, afp, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, integer_t const n, MatrixAP& ap,
+ MatrixAFP& afp, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( fact, n, ap, afp, ipiv, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call hpsvx
+template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t hpsvx( char const fact, integer_t const n, MatrixAP& ap,
+ MatrixAFP& afp, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixAP >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ hpsvx_impl< value_type >::compute( fact, n, ap, afp, ipiv, b, x,
+ rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lacgv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lacgv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LACGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LACGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void lacgv( integer_t const n, traits::complex_f* x,
+ integer_t const incx ) {
+ LAPACK_CLACGV( &n, traits::complex_ptr(x), &incx );
+ }
+ inline void lacgv( integer_t const n, traits::complex_d* x,
+ integer_t const incx ) {
+ LAPACK_ZLACGV( &n, traits::complex_ptr(x), &incx );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct lacgv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorX >
+ static void compute( integer_t const n, VectorX& x,
+ integer_t const incx ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+#endif
+ detail::lacgv( n, traits::vector_storage(x), incx );
+ }
+};
+
+
+// template function to call lacgv
+template< typename VectorX >
+inline integer_t lacgv( integer_t const n, VectorX& x,
+ integer_t const incx ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ integer_t info(0);
+ lacgv_impl< value_type >::compute( n, x, incx );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,260 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LALSD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LALSD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void lalsd( char const uplo, integer_t const smlsiz,
+ integer_t const n, integer_t const nrhs, float* d, float* e,
+ float* b, integer_t const ldb, float const rcond, integer_t& rank,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SLALSD( &uplo, &smlsiz, &n, &nrhs, d, e, b, &ldb, &rcond,
+ &rank, work, iwork, &info );
+ }
+ inline void lalsd( char const uplo, integer_t const smlsiz,
+ integer_t const n, integer_t const nrhs, double* d, double* e,
+ double* b, integer_t const ldb, double const rcond,
+ integer_t& rank, double* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_DLALSD( &uplo, &smlsiz, &n, &nrhs, d, e, b, &ldb, &rcond,
+ &rank, work, iwork, &info );
+ }
+ inline void lalsd( char const uplo, integer_t const smlsiz,
+ integer_t const n, integer_t const nrhs, float* d, float* e,
+ traits::complex_f* b, integer_t const ldb, float const rcond,
+ integer_t& rank, traits::complex_f* work, float* rwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_CLALSD( &uplo, &smlsiz, &n, &nrhs, d, e,
+ traits::complex_ptr(b), &ldb, &rcond, &rank,
+ traits::complex_ptr(work), rwork, iwork, &info );
+ }
+ inline void lalsd( char const uplo, integer_t const smlsiz,
+ integer_t const n, integer_t const nrhs, double* d, double* e,
+ traits::complex_d* b, integer_t const ldb, double const rcond,
+ integer_t& rank, traits::complex_d* work, double* rwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_ZLALSD( &uplo, &smlsiz, &n, &nrhs, d, e,
+ traits::complex_ptr(b), &ldb, &rcond, &rank,
+ traits::complex_ptr(work), rwork, iwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct lalsd_impl{};
+
+// real specialization
+template< typename ValueType >
+struct lalsd_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixB,
+ typename WORK, typename IWORK >
+ static void compute( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ integer_t nlvl = std::max( 0, static_cast<integer_t>(
+ std::log(static_cast<real_type>(n)/static_cast<real_type>(smlsiz+
+ 1)) /
+ std::log(static_cast<real_type>(2.)) ) + 1 );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 1 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n, smlsiz, nlvl, traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n, nlvl )));
+#endif
+ detail::lalsd( uplo, smlsiz, n, traits::matrix_size2(b),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ rcond, rank, traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ integer_t nlvl = std::max( 0, static_cast<integer_t>(
+ std::log(static_cast<real_type>(n)/static_cast<real_type>(smlsiz+
+ 1)) /
+ std::log(static_cast<real_type>(2.)) ) + 1 );
+ traits::detail::array< real_type > tmp_work( min_size_work( n, smlsiz,
+ nlvl, traits::matrix_size2(b) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n,
+ nlvl ) );
+ compute( uplo, smlsiz, n, d, e, b, rcond, rank, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, smlsiz, n, d, e, b, rcond, rank, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const smlsiz,
+ integer_t const nlvl, integer_t const nrhs ) {
+ integer_t smlsiz_plus_one = smlsiz + 1;
+ return 9*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs +
+ smlsiz_plus_one * smlsiz_plus_one;
+ }
+
+ static integer_t min_size_iwork( integer_t const n,
+ integer_t const nlvl ) {
+ return 3*n*nlvl + 11*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct lalsd_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixB,
+ typename WORK, typename RWORK, typename IWORK >
+ static void compute( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ detail::workspace3< WORK, RWORK, IWORK > work ) {
+#ifndef NDEBUG
+ integer_t nlvl = std::max( 0, static_cast<integer_t>(
+ std::log(static_cast<real_type>(std::min(traits::matrix_size2(b),
+ n))/
+ static_cast<real_type>(smlsiz+1)) /
+ std::log(static_cast<real_type>(2.))) + 1 );
+ assert( uplo == 'U' || uplo == 'L' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 1 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n, traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n, smlsiz, nlvl, traits::matrix_size2(b) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n, nlvl )));
+#endif
+ detail::lalsd( uplo, smlsiz, n, traits::matrix_size2(b),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ rcond, rank,
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ minimal_workspace work ) {
+ integer_t nlvl = std::max( 0, static_cast<integer_t>(
+ std::log(static_cast<real_type>(std::min(traits::matrix_size2(b),
+ n))/
+ static_cast<real_type>(smlsiz+1)) /
+ std::log(static_cast<real_type>(2.))) + 1 );
+ traits::detail::array< value_type > tmp_work( min_size_work( n,
+ traits::matrix_size2(b) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n,
+ smlsiz, nlvl, traits::matrix_size2(b) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n,
+ nlvl ) );
+ compute( uplo, smlsiz, n, d, e, b, rcond, rank, info,
+ workspace( tmp_work, tmp_rwork, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ real_type const rcond, integer_t& rank, integer_t& info,
+ optimal_workspace work ) {
+ compute( uplo, smlsiz, n, d, e, b, rcond, rank, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n, integer_t const nrhs ) {
+ return n*nrhs;
+ }
+
+ static integer_t min_size_rwork( integer_t const n,
+ integer_t const smlsiz, integer_t const nlvl,
+ integer_t const nrhs ) {
+ integer_t smlsiz_plus_one = smlsiz + 1;
+ return 9*n + 2*n*smlsiz + 8*n*nlvl + 3*smlsiz*nrhs +
+ smlsiz_plus_one * smlsiz_plus_one;
+ }
+
+ static integer_t min_size_iwork( integer_t const n,
+ integer_t const nlvl ) {
+ return 3*n*nlvl+11*n;
+ }
+};
+
+
+// template function to call lalsd
+template< typename VectorD, typename VectorE, typename MatrixB,
+ typename Workspace >
+inline integer_t lalsd( char const uplo, integer_t const smlsiz,
+ integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
+ typename traits::vector_traits< VectorD >::value_type const rcond,
+ integer_t& rank, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ lalsd_impl< value_type >::compute( uplo, smlsiz, n, d, e, b, rcond,
+ rank, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/largv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/largv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,92 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LARGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LARGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void largv( integer_t const n, float* x, integer_t const incx,
+ float* y, integer_t const incy, float* c, integer_t const incc ) {
+ LAPACK_SLARGV( &n, x, &incx, y, &incy, c, &incc );
+ }
+ inline void largv( integer_t const n, double* x, integer_t const incx,
+ double* y, integer_t const incy, double* c,
+ integer_t const incc ) {
+ LAPACK_DLARGV( &n, x, &incx, y, &incy, c, &incc );
+ }
+ inline void largv( integer_t const n, traits::complex_f* x,
+ integer_t const incx, traits::complex_f* y, integer_t const incy,
+ float* c, integer_t const incc ) {
+ LAPACK_CLARGV( &n, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(y), &incy, c, &incc );
+ }
+ inline void largv( integer_t const n, traits::complex_d* x,
+ integer_t const incx, traits::complex_d* y, integer_t const incy,
+ double* c, integer_t const incc ) {
+ LAPACK_ZLARGV( &n, traits::complex_ptr(x), &incx,
+ traits::complex_ptr(y), &incy, c, &incc );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct largv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorX, typename VectorY, typename VectorC >
+ static void compute( integer_t const n, VectorX& x, integer_t const incx,
+ VectorY& y, integer_t const incy, VectorC& c,
+ integer_t const incc ) {
+#ifndef NDEBUG
+ assert( traits::vector_size(x) >= 1+(n-1)*incx );
+ assert( traits::vector_size(y) >= 1+(n-1)*incy );
+ assert( traits::vector_size(c) >= 1+(n-1)*incc );
+#endif
+ detail::largv( n, traits::vector_storage(x), incx,
+ traits::vector_storage(y), incy, traits::vector_storage(c),
+ incc );
+ }
+};
+
+
+// template function to call largv
+template< typename VectorX, typename VectorY, typename VectorC >
+inline integer_t largv( integer_t const n, VectorX& x,
+ integer_t const incx, VectorY& y, integer_t const incy, VectorC& c,
+ integer_t const incc ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ integer_t info(0);
+ largv_impl< value_type >::compute( n, x, incx, y, incy, c, incc );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/pbsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/pbsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbsv( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, float* ab, integer_t const ldab, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SPBSV( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ }
+ inline void pbsv( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, double* ab, integer_t const ldab, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DPBSV( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ }
+ inline void pbsv( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, traits::complex_f* ab, integer_t const ldab,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CPBSV( &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab), &ldab,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void pbsv( char const uplo, integer_t const n, integer_t const kd,
+ integer_t const nrhs, traits::complex_d* ab, integer_t const ldab,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPBSV( &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab), &ldab,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct pbsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAB, typename MatrixB >
+ static void compute( integer_t const kd, MatrixAB& ab, MatrixB& b,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( traits::matrix_size2(ab) >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ab)) );
+#endif
+ detail::pbsv( traits::matrix_uplo_tag(ab), traits::matrix_size2(ab),
+ kd, traits::matrix_size2(b), traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call pbsv
+template< typename MatrixAB, typename MatrixB >
+inline integer_t pbsv( integer_t const kd, MatrixAB& ab, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbsv_impl< value_type >::compute( kd, ab, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/pbsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/pbsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,273 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PBSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PBSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void pbsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const kd, integer_t const nrhs, float* ab,
+ integer_t const ldab, float* afb, integer_t const ldafb,
+ char& equed, float* s, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SPBSVX( &fact, &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb,
+ &equed, s, b, &ldb, x, &ldx, &rcond, ferr, berr, work, iwork,
+ &info );
+ }
+ inline void pbsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const kd, integer_t const nrhs, double* ab,
+ integer_t const ldab, double* afb, integer_t const ldafb,
+ char& equed, double* s, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DPBSVX( &fact, &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb,
+ &equed, s, b, &ldb, x, &ldx, &rcond, ferr, berr, work, iwork,
+ &info );
+ }
+ inline void pbsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const kd, integer_t const nrhs, traits::complex_f* ab,
+ integer_t const ldab, traits::complex_f* afb,
+ integer_t const ldafb, char& equed, float* s,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CPBSVX( &fact, &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(afb), &ldafb, &equed, s,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void pbsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const kd, integer_t const nrhs, traits::complex_d* ab,
+ integer_t const ldab, traits::complex_d* afb,
+ integer_t const ldafb, char& equed, double* s,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZPBSVX( &fact, &uplo, &n, &kd, &nrhs, traits::complex_ptr(ab),
+ &ldab, traits::complex_ptr(afb), &ldafb, &equed, s,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct pbsvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct pbsvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'Y' || fact == 'N' || fact == 'E' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(afb) >= kd+1 );
+ assert( equed == 'N' || equed == 'Y' );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::pbsvx( fact, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_size2(x), traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::matrix_storage(afb),
+ traits::leading_dimension(afb), equed,
+ traits::vector_storage(s), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( fact, n, kd, ab, afb, equed, s, b, x, rcond, ferr, berr,
+ info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, n, kd, ab, afb, equed, s, b, x, rcond, ferr, berr,
+ info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct pbsvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'Y' || fact == 'N' || fact == 'E' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(ab) >= kd+1 );
+ assert( traits::leading_dimension(afb) >= kd+1 );
+ assert( equed == 'N' || equed == 'Y' );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::pbsvx( fact, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_size2(x), traits::matrix_storage(ab),
+ traits::leading_dimension(ab), traits::matrix_storage(afb),
+ traits::leading_dimension(afb), equed,
+ traits::vector_storage(s), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( fact, n, kd, ab, afb, equed, s, b, x, rcond, ferr, berr,
+ info, workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, n, kd, ab, afb, equed, s, b, x, rcond, ferr, berr,
+ info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call pbsvx
+template< typename MatrixAB, typename MatrixAFB, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t pbsvx( char const fact, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixAFB& afb, char& equed,
+ VectorS& s, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixAB >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ pbsvx_impl< value_type >::compute( fact, n, kd, ab, afb, equed, s, b,
+ x, rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/posv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/posv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void posv( char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SPOSV( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ }
+ inline void posv( char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DPOSV( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ }
+ inline void posv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CPOSV( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void posv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPOSV( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct posv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixA, typename MatrixB >
+ static void compute( MatrixA& a, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+#endif
+ detail::posv( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call posv
+template< typename MatrixA, typename MatrixB >
+inline integer_t posv( MatrixA& a, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ posv_impl< value_type >::compute( a, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/posvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/posvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,274 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_POSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_POSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void posvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* af,
+ integer_t const ldaf, char& equed, float* s, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float& rcond,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t& info ) {
+ LAPACK_SPOSVX( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, &equed, s,
+ b, &ldb, x, &ldx, &rcond, ferr, berr, work, iwork, &info );
+ }
+ inline void posvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* af,
+ integer_t const ldaf, char& equed, double* s, double* b,
+ integer_t const ldb, double* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DPOSVX( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, &equed, s,
+ b, &ldb, x, &ldx, &rcond, ferr, berr, work, iwork, &info );
+ }
+ inline void posvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, char& equed,
+ float* s, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* x, integer_t const ldx, float& rcond,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPOSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, &equed, s,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+ inline void posvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, char& equed,
+ double* s, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* x, integer_t const ldx, double& rcond,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZPOSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, &equed, s,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(x), &ldx,
+ &rcond, ferr, berr, traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct posvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct posvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'Y' || fact == 'N' || fact == 'E' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( equed == 'N' || equed == 'Y' );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::posvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ equed, traits::vector_storage(s), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, a, af, equed, s, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, a, af, equed, s, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct posvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'Y' || fact == 'N' || fact == 'E' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( equed == 'N' || equed == 'Y' );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::posvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ equed, traits::vector_storage(s), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, a, af, equed, s, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, a, af, equed, s, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call posvx
+template< typename MatrixA, typename MatrixAF, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t posvx( char const fact, MatrixA& a, MatrixAF& af,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ posvx_impl< value_type >::compute( fact, a, af, equed, s, b, x,
+ rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ppsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ppsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PPSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PPSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ppsv( char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, float* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_SPPSV( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ }
+ inline void ppsv( char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, double* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_DPPSV( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ }
+ inline void ppsv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap, traits::complex_f* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_CPPSV( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void ppsv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap, traits::complex_d* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_ZPPSV( &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ppsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename MatrixB >
+ static void compute( MatrixAP& ap, MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+#endif
+ detail::ppsv( traits::matrix_uplo_tag(ap), traits::matrix_size2(ap),
+ traits::matrix_size2(b), traits::matrix_storage(ap),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ info );
+ }
+};
+
+
+// template function to call ppsv
+template< typename MatrixAP, typename MatrixB >
+inline integer_t ppsv( MatrixAP& ap, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ ppsv_impl< value_type >::compute( ap, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ppsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ppsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,260 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PPSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PPSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ppsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, float* afp, char& equed,
+ float* s, float* b, integer_t const ldb, float* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_SPPSVX( &fact, &uplo, &n, &nrhs, ap, afp, &equed, s, b, &ldb,
+ x, &ldx, &rcond, ferr, berr, work, iwork, &info );
+ }
+ inline void ppsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, double* afp, char& equed,
+ double* s, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t& info ) {
+ LAPACK_DPPSVX( &fact, &uplo, &n, &nrhs, ap, afp, &equed, s, b, &ldb,
+ x, &ldx, &rcond, ferr, berr, work, iwork, &info );
+ }
+ inline void ppsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* afp, char& equed, float* s,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ traits::complex_f* work, float* rwork, integer_t& info ) {
+ LAPACK_CPPSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), &equed, s, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void ppsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* afp, char& equed, double* s,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZPPSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), &equed, s, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ppsvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ppsvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'Y' || fact == 'N' || fact == 'E' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( equed == 'N' || equed == 'Y' );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(ap) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(ap) )));
+#endif
+ detail::ppsvx( fact, traits::matrix_uplo_tag(ap),
+ traits::matrix_size2(ap), traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::vector_storage(afp),
+ equed, traits::vector_storage(s), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(ap) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(ap) ) );
+ compute( fact, ap, afp, equed, s, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, ap, afp, equed, s, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ppsvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'Y' || fact == 'N' || fact == 'E' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( equed == 'N' || equed == 'Y' );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(ap) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(ap) )));
+#endif
+ detail::ppsvx( fact, traits::matrix_uplo_tag(ap),
+ traits::matrix_size2(ap), traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::vector_storage(afp),
+ equed, traits::vector_storage(s), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(ap) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(ap) ) );
+ compute( fact, ap, afp, equed, s, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, ap, afp, equed, s, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call ppsvx
+template< typename MatrixAP, typename VectorAFP, typename VectorS,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t ppsvx( char const fact, MatrixAP& ap, VectorAFP& afp,
+ char& equed, VectorS& s, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixAP >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ ppsvx_impl< value_type >::compute( fact, ap, afp, equed, s, b, x,
+ rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,91 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PTSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PTSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ptsv( integer_t const n, integer_t const nrhs, float* d,
+ float* e, float* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_SPTSV( &n, &nrhs, d, e, b, &ldb, &info );
+ }
+ inline void ptsv( integer_t const n, integer_t const nrhs, double* d,
+ double* e, double* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_DPTSV( &n, &nrhs, d, e, b, &ldb, &info );
+ }
+ inline void ptsv( integer_t const n, integer_t const nrhs, float* d,
+ traits::complex_f* e, traits::complex_f* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_CPTSV( &n, &nrhs, d, traits::complex_ptr(e),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void ptsv( integer_t const n, integer_t const nrhs, double* d,
+ traits::complex_d* e, traits::complex_d* b, integer_t const ldb,
+ integer_t& info ) {
+ LAPACK_ZPTSV( &n, &nrhs, d, traits::complex_ptr(e),
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct ptsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename VectorD, typename VectorE, typename MatrixB >
+ static void compute( integer_t const n, VectorD& d, VectorE& e,
+ MatrixB& b, integer_t& info ) {
+#ifndef NDEBUG
+ assert( n >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+#endif
+ detail::ptsv( n, traits::matrix_size2(b), traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call ptsv
+template< typename VectorD, typename VectorE, typename MatrixB >
+inline integer_t ptsv( integer_t const n, VectorD& d, VectorE& e,
+ MatrixB& b ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ ptsv_impl< value_type >::compute( n, d, e, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,243 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_PTSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_PTSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void ptsvx( char const fact, integer_t const n,
+ integer_t const nrhs, float* d, float* e, float* df, float* ef,
+ float* b, integer_t const ldb, float* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, float* work,
+ integer_t& info ) {
+ LAPACK_SPTSVX( &fact, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx,
+ &rcond, ferr, berr, work, &info );
+ }
+ inline void ptsvx( char const fact, integer_t const n,
+ integer_t const nrhs, double* d, double* e, double* df,
+ double* ef, double* b, integer_t const ldb, double* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ double* work, integer_t& info ) {
+ LAPACK_DPTSVX( &fact, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx,
+ &rcond, ferr, berr, work, &info );
+ }
+ inline void ptsvx( char const fact, integer_t const n,
+ integer_t const nrhs, float* d, traits::complex_f* e, float* df,
+ traits::complex_f* ef, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* x, integer_t const ldx, float& rcond,
+ float* ferr, float* berr, traits::complex_f* work, float* rwork,
+ integer_t& info ) {
+ LAPACK_CPTSVX( &fact, &n, &nrhs, d, traits::complex_ptr(e), df,
+ traits::complex_ptr(ef), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void ptsvx( char const fact, integer_t const n,
+ integer_t const nrhs, double* d, traits::complex_d* e, double* df,
+ traits::complex_d* ef, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* x, integer_t const ldx, double& rcond,
+ double* ferr, double* berr, traits::complex_d* work,
+ double* rwork, integer_t& info ) {
+ LAPACK_ZPTSVX( &fact, &n, &nrhs, d, traits::complex_ptr(e), df,
+ traits::complex_ptr(ef), traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct ptsvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct ptsvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK >
+ static void compute( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::ptsvx( fact, n, traits::matrix_size2(x),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(df), traits::vector_storage(ef),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( fact, n, d, e, df, ef, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( fact, n, d, e, df, ef, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct ptsvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename WORK,
+ typename RWORK >
+ static void compute( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( n >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::leading_dimension(x) >= std::max(1,n) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( n )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( n )));
+#endif
+ detail::ptsvx( fact, n, traits::matrix_size2(x),
+ traits::vector_storage(d), traits::vector_storage(e),
+ traits::vector_storage(df), traits::vector_storage(ef),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::matrix_storage(x), traits::leading_dimension(x),
+ rcond, traits::vector_storage(ferr),
+ traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
+ compute( fact, n, d, e, df, ef, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR >
+ static void compute( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ real_type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ integer_t& info, optimal_workspace work ) {
+ compute( fact, n, d, e, df, ef, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call ptsvx
+template< typename VectorD, typename VectorE, typename VectorDF,
+ typename VectorEF, typename MatrixB, typename MatrixX,
+ typename VectorFERR, typename VectorBERR, typename Workspace >
+inline integer_t ptsvx( char const fact, integer_t const n, VectorD& d,
+ VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
+ typename traits::vector_traits< VectorD >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ ptsvx_impl< value_type >::compute( fact, n, d, e, df, ef, b, x,
+ rcond, ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbev( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, float* ab, integer_t const ldab, float* w,
+ float* z, integer_t const ldz, float* work, integer_t& info ) {
+ LAPACK_SSBEV( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &info );
+ }
+ inline void sbev( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, double* ab, integer_t const ldab, double* w,
+ double* z, integer_t const ldz, double* work, integer_t& info ) {
+ LAPACK_DSBEV( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename WORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::sbev( jobz, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( jobz, n, kd, ab, w, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, n, kd, ab, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max(1,3*n-2);
+ }
+};
+
+
+// template function to call sbev
+template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t sbev( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbev_impl< value_type >::compute( jobz, n, kd, ab, w, z, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,155 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbevd( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, float* ab, integer_t const ldab, float* w,
+ float* z, integer_t const ldz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_SSBEVD( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ }
+ inline void sbevd( char const jobz, char const uplo, integer_t const n,
+ integer_t const kd, double* ab, integer_t const ldab, double* w,
+ double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSBEVD( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename WORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t const liwork, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::sbevd( jobz, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), liwork,
+ info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t const liwork, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, kd, ab, w, z, liwork, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t const liwork, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::sbevd( jobz, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, kd, ab, w, z, liwork, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return 2*n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call sbevd
+template< typename MatrixAB, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t sbevd( char const jobz, integer_t const n,
+ integer_t const kd, MatrixAB& ab, VectorW& w, MatrixZ& z,
+ integer_t const liwork, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbevd_impl< value_type >::compute( jobz, n, kd, ab, w, z, liwork,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,156 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbevx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const kd, float* ab,
+ integer_t const ldab, float* q, integer_t const ldq,
+ float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, integer_t& m, float* w,
+ float* z, integer_t const ldz, float* work, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_SSBEVX( &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq, &vl,
+ &vu, &il, &iu, &abstol, &m, w, z, &ldz, work, iwork, ifail,
+ &info );
+ }
+ inline void sbevx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const kd, double* ab,
+ integer_t const ldab, double* q, integer_t const ldq,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ double* z, integer_t const ldz, double* work, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_DSBEVX( &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq, &vl,
+ &vu, &il, &iu, &abstol, &m, w, z, &ldz, work, iwork, ifail,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixQ& q, real_type const vl,
+ real_type const vu, integer_t const il, integer_t const iu,
+ real_type const abstol, integer_t& m, VectorW& w, MatrixZ& z,
+ VectorIFAIL& ifail, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( kd >= 0 );
+ assert( traits::leading_dimension(ab) >= kd );
+ assert( traits::leading_dimension(q) >= std::max(1,n) );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::sbevx( jobz, range, traits::matrix_uplo_tag(ab), n, kd,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(q), traits::leading_dimension(q), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixQ& q, real_type const vl,
+ real_type const vu, integer_t const il, integer_t const iu,
+ real_type const abstol, integer_t& m, VectorW& w, MatrixZ& z,
+ VectorIFAIL& ifail, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, kd, ab, q, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const kd, MatrixAB& ab, MatrixQ& q, real_type const vl,
+ real_type const vu, integer_t const il, integer_t const iu,
+ real_type const abstol, integer_t& m, VectorW& w, MatrixZ& z,
+ VectorIFAIL& ifail, integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, kd, ab, q, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call sbevx
+template< typename MatrixAB, typename MatrixQ, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t sbevx( char const jobz, char const range,
+ integer_t const n, integer_t const kd, MatrixAB& ab, MatrixQ& q,
+ typename traits::matrix_traits< MatrixAB >::value_type const vl,
+ typename traits::matrix_traits< MatrixAB >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAB >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbevx_impl< value_type >::compute( jobz, range, n, kd, ab, q, vl, vu,
+ il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,126 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbgv( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, float* ab,
+ integer_t const ldab, float* bb, integer_t const ldbb, float* w,
+ float* z, integer_t const ldz, float* work, integer_t& info ) {
+ LAPACK_SSBGV( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &info );
+ }
+ inline void sbgv( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, double* ab,
+ integer_t const ldab, double* bb, integer_t const ldbb, double* w,
+ double* z, integer_t const ldz, double* work, integer_t& info ) {
+ LAPACK_DSBGV( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbgv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename WORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= 0 );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::sbgv( jobz, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ optimal_workspace work ) {
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+};
+
+
+// template function to call sbgv
+template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t sbgv( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab, MatrixBB& bb,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbgv_impl< value_type >::compute( jobz, n, ka, kb, ab, bb, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,165 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBGVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBGVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbgvd( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, float* ab,
+ integer_t const ldab, float* bb, integer_t const ldbb, float* w,
+ float* z, integer_t const ldz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_SSBGVD( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &lwork, iwork, &liwork, &info );
+ }
+ inline void sbgvd( char const jobz, char const uplo, integer_t const n,
+ integer_t const ka, integer_t const kb, double* ab,
+ integer_t const ldab, double* bb, integer_t const ldbb, double* w,
+ double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSBGVD( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &lwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbgvd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename WORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= 0 );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::sbgvd( jobz, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ >
+ static void compute( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, VectorW& w, MatrixZ& z, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::sbgvd( jobz, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, ka, kb, ab, bb, w, z, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return 3*n;
+ else
+ return 1 + 5*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call sbgvd
+template< typename MatrixAB, typename MatrixBB, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t sbgvd( char const jobz, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab, MatrixBB& bb,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbgvd_impl< value_type >::compute( jobz, n, ka, kb, ab, bb, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbgvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,163 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SBGVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SBGVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sbgvx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const ka, integer_t const kb,
+ float* ab, integer_t const ldab, float* bb, integer_t const ldbb,
+ float* q, integer_t const ldq, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, float* z, integer_t const ldz,
+ float* work, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_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 );
+ }
+ inline void sbgvx( char const jobz, char const range, char const uplo,
+ integer_t const n, integer_t const ka, integer_t const kb,
+ double* ab, integer_t const ldab, double* bb,
+ integer_t const ldbb, double* q, integer_t const ldq,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ double* z, integer_t const ldz, double* work, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_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 );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sbgvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL,
+ typename WORK, typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ab) == 'U' ||
+ traits::matrix_uplo_tag(ab) == 'L' );
+ assert( n >= 0 );
+ assert( ka >= 0 );
+ assert( kb >= 0 );
+ assert( traits::leading_dimension(ab) >= ka+1 );
+ assert( traits::leading_dimension(bb) >= kb+1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::sbgvx( jobz, range, traits::matrix_uplo_tag(ab), n, ka, kb,
+ traits::matrix_storage(ab), traits::leading_dimension(ab),
+ traits::matrix_storage(bb), traits::leading_dimension(bb),
+ traits::matrix_storage(q), traits::leading_dimension(q), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, ka, kb, ab, bb, q, vl, vu, il, iu, abstol, m,
+ w, z, ifail, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ integer_t const ka, integer_t const kb, MatrixAB& ab,
+ MatrixBB& bb, MatrixQ& q, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, ka, kb, ab, bb, q, vl, vu, il, iu, abstol, m,
+ w, z, ifail, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 7*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call sbgvx
+template< typename MatrixAB, typename MatrixBB, typename MatrixQ,
+ typename VectorW, typename MatrixZ, typename VectorIFAIL,
+ typename Workspace >
+inline integer_t sbgvx( char const jobz, char const range,
+ integer_t const n, integer_t const ka, integer_t const kb,
+ MatrixAB& ab, MatrixBB& bb, MatrixQ& q,
+ typename traits::matrix_traits< MatrixAB >::value_type const vl,
+ typename traits::matrix_traits< MatrixAB >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAB >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAB >::value_type value_type;
+ integer_t info(0);
+ sbgvx_impl< value_type >::compute( jobz, range, n, ka, kb, ab, bb, q,
+ vl, vu, il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sgesv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sgesv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,124 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SGESV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SGESV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sgesv( integer_t const n, integer_t const nrhs, double* a,
+ integer_t const lda, integer_t* ipiv, double* b,
+ integer_t const ldb, double* x, integer_t const ldx, double* work,
+ float* swork, integer_t& iter, integer_t& info ) {
+ LAPACK_DSGESV( &n, &nrhs, a, &lda, ipiv, b, &ldb, x, &ldx, work,
+ swork, &iter, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sgesv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename WORK, typename SWORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ integer_t& iter, integer_t& info, detail::workspace2< WORK,
+ SWORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(ipiv) >= traits::matrix_size2(a) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ $CALL_MIN_SIZE )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_swork( traits::matrix_size2(a),
+ traits::matrix_size2(b) )));
+#endif
+ detail::sgesv( traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), traits::matrix_storage(work),
+ traits::vector_storage(work.select(real_type())), iter, info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ integer_t& iter, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_swork( min_size_swork(
+ traits::matrix_size2(a), traits::matrix_size2(b) ) );
+ compute( a, ipiv, b, x, iter, info, workspace( tmp_work, tmp_swork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ integer_t& iter, integer_t& info, optimal_workspace work ) {
+ compute( a, ipiv, b, x, iter, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( $ARGUMENTS ) {
+ $MIN_SIZE
+ }
+
+ static integer_t min_size_swork( integer_t const n,
+ integer_t const nrhs ) {
+ return n*(n+nrhs);
+ }
+};
+
+
+// template function to call sgesv
+template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename MatrixX, typename Workspace >
+inline integer_t sgesv( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ MatrixX& x, integer_t& iter, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sgesv_impl< value_type >::compute( a, ipiv, b, x, iter, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,107 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spev( char const jobz, char const uplo, integer_t const n,
+ float* ap, float* w, float* z, integer_t const ldz, float* work,
+ integer_t& info ) {
+ LAPACK_SSPEV( &jobz, &uplo, &n, ap, w, z, &ldz, work, &info );
+ }
+ inline void spev( char const jobz, char const uplo, integer_t const n,
+ double* ap, double* w, double* z, integer_t const ldz,
+ double* work, integer_t& info ) {
+ LAPACK_DSPEV( &jobz, &uplo, &n, ap, w, z, &ldz, work, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename WORK >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::spev( jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( jobz, n, ap, w, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( jobz, n, ap, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+};
+
+
+// template function to call spev
+template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t spev( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spev_impl< value_type >::compute( jobz, n, ap, w, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,143 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spevd( char const jobz, char const uplo, integer_t const n,
+ float* ap, float* w, float* z, integer_t const ldz, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_SSPEVD( &jobz, &uplo, &n, ap, w, z, &ldz, work, &lwork, iwork,
+ &liwork, &info );
+ }
+ inline void spevd( char const jobz, char const uplo, integer_t const n,
+ double* ap, double* w, double* z, integer_t const ldz,
+ double* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, integer_t& info ) {
+ LAPACK_DSPEVD( &jobz, &uplo, &n, ap, w, z, &ldz, work, &lwork, iwork,
+ &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename WORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::spevd( jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, ap, w, z, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::spevd( jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ &opt_size_work, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, ap, w, z, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return 2*n;
+ else
+ return 1 + 6*n + n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call spevd
+template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename Workspace >
+inline integer_t spevd( char const jobz, integer_t const n, MatrixAP& ap,
+ VectorW& w, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spevd_impl< value_type >::compute( jobz, n, ap, w, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,145 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spevx( char const jobz, char const range, char const uplo,
+ integer_t const n, float* ap, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, float* z, integer_t const ldz,
+ float* work, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_SSPEVX( &jobz, &range, &uplo, &n, ap, &vl, &vu, &il, &iu,
+ &abstol, &m, w, z, &ldz, work, iwork, ifail, &info );
+ }
+ inline void spevx( char const jobz, char const range, char const uplo,
+ integer_t const n, double* ap, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, double* z, integer_t const ldz,
+ double* work, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_DSPEVX( &jobz, &range, &uplo, &n, ap, &vl, &vu, &il, &iu,
+ &abstol, &m, w, z, &ldz, work, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename WORK, typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ MatrixAP& ap, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::spevx( jobz, range, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ MatrixAP& ap, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, ap, vl, vu, il, iu, abstol, m, w, z, ifail,
+ info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ MatrixAP& ap, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, ap, vl, vu, il, iu, abstol, m, w, z, ifail,
+ info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 8*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call spevx
+template< typename MatrixAP, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename Workspace >
+inline integer_t spevx( char const jobz, char const range,
+ integer_t const n, MatrixAP& ap,
+ typename traits::matrix_traits< MatrixAP >::value_type const vl,
+ typename traits::matrix_traits< MatrixAP >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAP >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spevx_impl< value_type >::compute( jobz, range, n, ap, vl, vu, il,
+ iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spgv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, float* ap, float* bp, float* w, float* z,
+ integer_t const ldz, float* work, integer_t& info ) {
+ LAPACK_SSPGV( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &info );
+ }
+ inline void spgv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, double* ap, double* bp, double* w, double* z,
+ integer_t const ldz, double* work, integer_t& info ) {
+ LAPACK_DSPGV( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spgv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename WORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::spgv( itype, jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( itype, jobz, n, ap, bp, w, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( itype, jobz, n, ap, bp, w, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+};
+
+
+// template function to call spgv
+template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t spgv( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spgv_impl< value_type >::compute( itype, jobz, n, ap, bp, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,156 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPGVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPGVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spgvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, float* ap, float* bp,
+ float* w, float* z, integer_t const ldz, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_SSPGVD( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ }
+ inline void spgvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, double* ap, double* bp,
+ double* w, double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSPGVD( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spgvd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename WORK, typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::spgvd( itype, jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( itype, jobz, n, ap, bp, w, z, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w,
+ MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::spgvd( itype, jobz, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp),
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( itype, jobz, n, ap, bp, w, z, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return 2*n;
+ else
+ return 1 + 6*n + n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call spgvd
+template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename Workspace >
+inline integer_t spgvd( integer_t const itype, char const jobz,
+ integer_t const n, MatrixAP& ap, MatrixBP& bp, VectorW& w, MatrixZ& z,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spgvd_impl< value_type >::compute( itype, jobz, n, ap, bp, w, z,
+ info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spgvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,150 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPGVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPGVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spgvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n, float* ap,
+ float* bp, float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, integer_t& m, float* w,
+ float* z, integer_t const ldz, float* work, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_SSPGVX( &itype, &jobz, &range, &uplo, &n, ap, bp, &vl, &vu,
+ &il, &iu, &abstol, &m, w, z, &ldz, work, iwork, ifail, &info );
+ }
+ inline void spgvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n, double* ap,
+ double* bp, double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ double* z, integer_t const ldz, double* work, integer_t* iwork,
+ integer_t* ifail, integer_t& info ) {
+ LAPACK_DSPGVX( &itype, &jobz, &range, &uplo, &n, ap, bp, &vl, &vu,
+ &il, &iu, &abstol, &m, w, z, &ldz, work, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spgvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( n >= 0 );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::spgvx( itype, jobz, range, traits::matrix_uplo_tag(ap), n,
+ traits::matrix_storage(ap), traits::matrix_storage(bp), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( itype, jobz, range, n, ap, bp, vl, vu, il, iu, abstol, m, w,
+ z, ifail, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ optimal_workspace work ) {
+ compute( itype, jobz, range, n, ap, bp, vl, vu, il, iu, abstol, m, w,
+ z, ifail, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 8*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call spgvx
+template< typename MatrixAP, typename MatrixBP, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t spgvx( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixAP& ap, MatrixBP& bp,
+ typename traits::matrix_traits< MatrixAP >::value_type const vl,
+ typename traits::matrix_traits< MatrixAP >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixAP >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spgvx_impl< value_type >::compute( itype, jobz, range, n, ap, bp, vl,
+ vu, il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spsv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spsv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spsv( char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, integer_t* ipiv, float* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_SSPSV( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ }
+ inline void spsv( char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, integer_t* ipiv, double* b,
+ integer_t const ldb, integer_t& info ) {
+ LAPACK_DSPSV( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ }
+ inline void spsv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_CSPSV( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+ inline void spsv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, integer_t& info ) {
+ LAPACK_ZSPSV( &uplo, &n, &nrhs, traits::complex_ptr(ap), ipiv,
+ traits::complex_ptr(b), &ldb, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct spsv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // templated specialization
+ template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixAP& ap, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+#endif
+ detail::spsv( traits::matrix_uplo_tag(ap), traits::matrix_size2(ap),
+ traits::matrix_size2(b), traits::matrix_storage(ap),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), info );
+ }
+};
+
+
+// template function to call spsv
+template< typename MatrixAP, typename VectorIPIV, typename MatrixB >
+inline integer_t spsv( MatrixAP& ap, VectorIPIV& ipiv, MatrixB& b ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spsv_impl< value_type >::compute( ap, ipiv, b, info );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/spsvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,258 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SPSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SPSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void spsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, float* ap, float* afp, integer_t* ipiv,
+ float* b, integer_t const ldb, float* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, float* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SSPSVX( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x,
+ &ldx, &rcond, ferr, berr, work, iwork, &info );
+ }
+ inline void spsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, double* ap, double* afp, integer_t* ipiv,
+ double* b, integer_t const ldb, double* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_DSPSVX( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x,
+ &ldx, &rcond, ferr, berr, work, iwork, &info );
+ }
+ inline void spsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* ap,
+ traits::complex_f* afp, integer_t* ipiv, traits::complex_f* b,
+ integer_t const ldb, traits::complex_f* x, integer_t const ldx,
+ float& rcond, float* ferr, float* berr, traits::complex_f* work,
+ float* rwork, integer_t& info ) {
+ LAPACK_CSPSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+ inline void spsvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* ap,
+ traits::complex_d* afp, integer_t* ipiv, traits::complex_d* b,
+ integer_t const ldb, traits::complex_d* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, double* rwork, integer_t& info ) {
+ LAPACK_ZSPSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(ap),
+ traits::complex_ptr(afp), ipiv, traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct spsvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct spsvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(ap) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(ap) )));
+#endif
+ detail::spsvx( fact, traits::matrix_uplo_tag(ap),
+ traits::matrix_size2(ap), traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(afp),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(ap) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(ap) ) );
+ compute( fact, ap, afp, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, ap, afp, ipiv, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 3*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct spsvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( traits::matrix_uplo_tag(ap) == 'U' ||
+ traits::matrix_uplo_tag(ap) == 'L' );
+ assert( traits::matrix_size2(ap) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(ap)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(ap) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(ap) )));
+#endif
+ detail::spsvx( fact, traits::matrix_uplo_tag(ap),
+ traits::matrix_size2(ap), traits::matrix_size2(x),
+ traits::matrix_storage(ap), traits::matrix_storage(afp),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(ap) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(ap) ) );
+ compute( fact, ap, afp, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ compute( fact, ap, afp, ipiv, b, x, rcond, ferr, berr, info,
+ minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 2*n;
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call spsvx
+template< typename MatrixAP, typename MatrixAFP, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t spsvx( char const fact, MatrixAP& ap, MatrixAFP& afp,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixAP >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixAP >::value_type value_type;
+ integer_t info(0);
+ spsvx_impl< value_type >::compute( fact, ap, afp, ipiv, b, x, rcond,
+ ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,105 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stev( char const jobz, integer_t const n, float* d, float* e,
+ float* z, integer_t const ldz, float* work, integer_t& info ) {
+ LAPACK_SSTEV( &jobz, &n, d, e, z, &ldz, work, &info );
+ }
+ inline void stev( char const jobz, integer_t const n, double* d,
+ double* e, double* z, integer_t const ldz, double* work,
+ integer_t& info ) {
+ LAPACK_DSTEV( &jobz, &n, d, e, z, &ldz, work, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename WORK >
+ static void compute( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info,
+ detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::stev( jobz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( jobz, n, d, e, z, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ compute( jobz, n, d, e, z, info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n-2 );
+ }
+};
+
+
+// template function to call stev
+template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename Workspace >
+inline integer_t stev( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stev_impl< value_type >::compute( jobz, n, d, e, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stevd( char const jobz, integer_t const n, float* d, float* e,
+ float* z, integer_t const ldz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_SSTEVD( &jobz, &n, d, e, z, &ldz, work, &lwork, iwork, &liwork,
+ &info );
+ }
+ inline void stevd( char const jobz, integer_t const n, double* d,
+ double* e, double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSTEVD( &jobz, &n, d, e, z, &ldz, work, &lwork, iwork, &liwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename WORK, typename IWORK >
+ static void compute( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, detail::workspace2< WORK,
+ IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( n >= 0 );
+ assert( traits::vector_size(e) >= n-1 );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::stevd( jobz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( jobz, n, d, e, z, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename MatrixZ >
+ static void compute( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::stevd( jobz, n, traits::vector_storage(d),
+ traits::vector_storage(e), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, n, d, e, z, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 1 + 4*n + n*n;
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call stevd
+template< typename VectorD, typename VectorE, typename MatrixZ,
+ typename Workspace >
+inline integer_t stevd( char const jobz, integer_t const n, VectorD& d,
+ VectorE& e, MatrixZ& z, Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stevd_impl< value_type >::compute( jobz, n, d, e, z, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,160 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEVR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEVR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stevr( char const jobz, char const range, integer_t const n,
+ float* d, float* e, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, float* z, integer_t const ldz,
+ integer_t* isuppz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_SSTEVR( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, z, &ldz, isuppz, work, &lwork, iwork, &liwork, &info );
+ }
+ inline void stevr( char const jobz, char const range, integer_t const n,
+ double* d, double* e, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, double* z, integer_t const ldz,
+ integer_t* isuppz, double* work, integer_t const lwork,
+ integer_t* iwork, integer_t const liwork, integer_t& info ) {
+ LAPACK_DSTEVR( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, z, &ldz, isuppz, work, &lwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stevr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ, typename WORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( n >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= std::max(1,n-1) );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(isuppz) >= 2*std::max(1,m) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::stevr( jobz, range, n, traits::vector_storage(d),
+ traits::vector_storage(e), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z,
+ isuppz, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::stevr( jobz, range, n, traits::vector_storage(d),
+ traits::vector_storage(e), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ &opt_size_work, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z,
+ isuppz, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 20*n );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return std::max( 1, 10*n );
+ }
+};
+
+
+// template function to call stevr
+template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorISUPPZ, typename Workspace >
+inline integer_t stevr( char const jobz, char const range,
+ integer_t const n, VectorD& d, VectorE& e,
+ typename traits::vector_traits< VectorD >::value_type const vl,
+ typename traits::vector_traits< VectorD >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::vector_traits< VectorD >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stevr_impl< value_type >::compute( jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, isuppz, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/stevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,147 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_STEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void stevx( char const jobz, char const range, integer_t const n,
+ float* d, float* e, float const vl, float const vu,
+ integer_t const il, integer_t const iu, float const abstol,
+ integer_t& m, float* w, float* z, integer_t const ldz,
+ float* work, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_SSTEVX( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, z, &ldz, work, iwork, ifail, &info );
+ }
+ inline void stevx( char const jobz, char const range, integer_t const n,
+ double* d, double* e, double const vl, double const vu,
+ integer_t const il, integer_t const iu, double const abstol,
+ integer_t& m, double* w, double* z, integer_t const ldz,
+ double* work, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_DSTEVX( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ &m, w, z, &ldz, work, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct stevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename IWORK >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( n >= 0 );
+ assert( traits::vector_size(d) >= n );
+ assert( traits::vector_size(e) >= std::max(1,n-1) );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::stevx( jobz, range, n, traits::vector_storage(d),
+ traits::vector_storage(e), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ifail,
+ info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( char const jobz, char const range, integer_t const n,
+ VectorD& d, VectorE& e, real_type const vl, real_type const vu,
+ integer_t const il, integer_t const iu, real_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ integer_t& info, optimal_workspace work ) {
+ compute( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ifail,
+ info, minimal_workspace() );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return 5*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call stevx
+template< typename VectorD, typename VectorE, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t stevx( char const jobz, char const range,
+ integer_t const n, VectorD& d, VectorE& e,
+ typename traits::vector_traits< VectorD >::value_type const vl,
+ typename traits::vector_traits< VectorD >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::vector_traits< VectorD >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ integer_t info(0);
+ stevx_impl< value_type >::compute( jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syev.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syev.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,116 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYEV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYEV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void syev( char const jobz, char const uplo, integer_t const n,
+ float* a, integer_t const lda, float* w, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SSYEV( &jobz, &uplo, &n, a, &lda, w, work, &lwork, &info );
+ }
+ inline void syev( char const jobz, char const uplo, integer_t const n,
+ double* a, integer_t const lda, double* w, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DSYEV( &jobz, &uplo, &n, a, &lda, w, work, &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syev_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename WORK >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+#endif
+ detail::syev( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ compute( jobz, a, w, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::syev( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobz, a, w, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 3*n-1 );
+ }
+};
+
+
+// template function to call syev
+template< typename MatrixA, typename VectorW, typename Workspace >
+inline integer_t syev( char const jobz, MatrixA& a, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ syev_impl< value_type >::compute( jobz, a, w, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,143 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYEVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYEVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void syevd( char const jobz, char const uplo, integer_t const n,
+ float* a, integer_t const lda, float* w, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_SSYEVD( &jobz, &uplo, &n, a, &lda, w, work, &lwork, iwork,
+ &liwork, &info );
+ }
+ inline void syevd( char const jobz, char const uplo, integer_t const n,
+ double* a, integer_t const lda, double* w, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSYEVD( &jobz, &uplo, &n, a, &lda, w, work, &lwork, iwork,
+ &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syevd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename WORK,
+ typename IWORK >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, traits::matrix_size2(a) )));
+#endif
+ detail::syevd( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ traits::matrix_size2(a) ) );
+ compute( jobz, a, w, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW >
+ static void compute( char const jobz, MatrixA& a, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::syevd( jobz, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(w),
+ &opt_size_work, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, a, w, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return 2*n + 1;
+ else
+ return 1 + 6*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call syevd
+template< typename MatrixA, typename VectorW, typename Workspace >
+inline integer_t syevd( char const jobz, MatrixA& a, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ syevd_impl< value_type >::compute( jobz, a, w, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevr.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,168 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYEVR_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYEVR_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void syevr( char const jobz, char const range, char const uplo,
+ integer_t const n, float* a, integer_t const lda, float const vl,
+ float const vu, integer_t const il, integer_t const iu,
+ float const abstol, integer_t& m, float* w, float* z,
+ integer_t const ldz, integer_t* isuppz, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_SSYEVR( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, &m, w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ }
+ inline void syevr( char const jobz, char const range, char const uplo,
+ integer_t const n, double* a, integer_t const lda,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ double* z, integer_t const ldz, integer_t* isuppz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_DSYEVR( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, &m, w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syevr_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ, typename WORK, typename IWORK >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(isuppz) >= 2*std::max(1,m) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::syevr( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, isuppz,
+ info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::syevr( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), traits::vector_storage(isuppz),
+ &opt_size_work, -1, &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, isuppz,
+ info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 26*n );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return std::max( 1, 10*n );
+ }
+};
+
+
+// template function to call syevr
+template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorISUPPZ, typename Workspace >
+inline integer_t syevr( char const jobz, char const range, MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const vl,
+ typename traits::matrix_traits< MatrixA >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixA >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ syevr_impl< value_type >::compute( jobz, range, a, vl, vu, il, iu,
+ abstol, m, w, z, isuppz, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/syevx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,168 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYEVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYEVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void syevx( char const jobz, char const range, char const uplo,
+ integer_t const n, float* a, integer_t const lda, float const vl,
+ float const vu, integer_t const il, integer_t const iu,
+ float const abstol, integer_t& m, float* w, float* z,
+ integer_t const ldz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_SSYEVX( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, &m, w, z, &ldz, work, &lwork, iwork, ifail, &info );
+ }
+ inline void syevx( char const jobz, char const range, char const uplo,
+ integer_t const n, double* a, integer_t const lda,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_DSYEVX( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, &m, w, z, &ldz, work, &lwork, iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct syevx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename WORK, typename IWORK >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(w) >= traits::matrix_size2(a) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::syevx( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, ifail, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL >
+ static void compute( char const jobz, char const range, MatrixA& a,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ detail::syevx( jobz, range, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_storage(a),
+ traits::leading_dimension(a), vl, vu, il, iu, abstol, m,
+ traits::vector_storage(w), traits::matrix_storage(z),
+ traits::leading_dimension(z), &opt_size_work, -1,
+ traits::vector_storage(tmp_iwork),
+ traits::vector_storage(ifail), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( jobz, range, a, vl, vu, il, iu, abstol, m, w, z, ifail, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else
+ return 8*n;
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call syevx
+template< typename MatrixA, typename VectorW, typename MatrixZ,
+ typename VectorIFAIL, typename Workspace >
+inline integer_t syevx( char const jobz, char const range, MatrixA& a,
+ typename traits::matrix_traits< MatrixA >::value_type const vl,
+ typename traits::matrix_traits< MatrixA >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixA >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ syevx_impl< value_type >::compute( jobz, range, a, vl, vu, il, iu,
+ abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,127 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYGV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYGV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sygv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, float* a, integer_t const lda, float* b,
+ integer_t const ldb, float* w, float* work, integer_t const lwork,
+ integer_t& info ) {
+ LAPACK_SSYGV( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, &info );
+ }
+ inline void sygv( integer_t const itype, char const jobz, char const uplo,
+ integer_t const n, double* a, integer_t const lda, double* b,
+ integer_t const ldb, double* w, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DSYGV( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sygv_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename WORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+#endif
+ detail::sygv( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::sygv( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 3*n-1 );
+ }
+};
+
+
+// template function to call sygv
+template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename Workspace >
+inline integer_t sygv( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sygv_impl< value_type >::compute( itype, jobz, n, a, b, w, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygvd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygvd.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,155 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYGVD_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYGVD_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sygvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, float* a, integer_t const lda,
+ float* b, integer_t const ldb, float* w, float* work,
+ integer_t const lwork, integer_t* iwork, integer_t const liwork,
+ integer_t& info ) {
+ LAPACK_SSYGVD( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, iwork, &liwork, &info );
+ }
+ inline void sygvd( integer_t const itype, char const jobz,
+ char const uplo, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb, double* w,
+ double* work, integer_t const lwork, integer_t* iwork,
+ integer_t const liwork, integer_t& info ) {
+ LAPACK_DSYGVD( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, iwork, &liwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sygvd_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename WORK, typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ jobz, n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( jobz, n )));
+#endif
+ detail::sygvd( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_size(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( jobz,
+ n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
+ n ) );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW >
+ static void compute( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ integer_t opt_size_iwork;
+ detail::sygvd( itype, jobz, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(w), &opt_size_work, -1,
+ &opt_size_iwork, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ traits::detail::array< integer_t > tmp_iwork( opt_size_iwork );
+ compute( itype, jobz, n, a, b, w, info, workspace( tmp_work,
+ tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( char const jobz, integer_t const n ) {
+ if ( n < 2 )
+ return 1;
+ else {
+ if ( jobz == 'N' )
+ return 2*n + 1;
+ else
+ return 1 + 6*n + 2*n*n;
+ }
+ }
+
+ static integer_t min_size_iwork( char const jobz, integer_t const n ) {
+ if ( jobz == 'N' || n < 2 )
+ return 1;
+ else
+ return 3 + 5*n;
+ }
+};
+
+
+// template function to call sygvd
+template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename Workspace >
+inline integer_t sygvd( integer_t const itype, char const jobz,
+ integer_t const n, MatrixA& a, MatrixB& b, VectorW& w,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sygvd_impl< value_type >::compute( itype, jobz, n, a, b, w, info,
+ work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,171 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYGVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYGVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sygvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n, float* a,
+ integer_t const lda, float* b, integer_t const ldb,
+ float const vl, float const vu, integer_t const il,
+ integer_t const iu, float const abstol, integer_t& m, float* w,
+ float* z, integer_t const ldz, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t* ifail, integer_t& info ) {
+ LAPACK_SSYGVX( &itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb,
+ &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, work, &lwork,
+ iwork, ifail, &info );
+ }
+ inline void sygvx( integer_t const itype, char const jobz,
+ char const range, char const uplo, integer_t const n, double* a,
+ integer_t const lda, double* b, integer_t const ldb,
+ double const vl, double const vu, integer_t const il,
+ integer_t const iu, double const abstol, integer_t& m, double* w,
+ double* z, integer_t const ldz, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t* ifail,
+ integer_t& info ) {
+ LAPACK_DSYGVX( &itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb,
+ &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, work, &lwork,
+ iwork, ifail, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType >
+struct sygvx_impl {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename WORK,
+ typename IWORK >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( jobz == 'N' || jobz == 'V' );
+ assert( range == 'A' || range == 'V' || range == 'I' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( n >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,n) );
+ assert( traits::leading_dimension(b) >= std::max(1,n) );
+ assert( traits::vector_size(w) >= n );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ n )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( n )));
+#endif
+ detail::sygvx( itype, jobz, range, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())),
+ traits::vector_storage(ifail), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( n ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ compute( itype, jobz, range, n, a, b, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL >
+ static void compute( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ real_type const vl, real_type const vu, integer_t const il,
+ integer_t const iu, real_type const abstol, integer_t& m,
+ VectorW& w, MatrixZ& z, VectorIFAIL& ifail, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n ) );
+ detail::sygvx( itype, jobz, range, traits::matrix_uplo_tag(a), n,
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(b), traits::leading_dimension(b), vl,
+ vu, il, iu, abstol, m, traits::vector_storage(w),
+ traits::matrix_storage(z), traits::leading_dimension(z),
+ &opt_size_work, -1, traits::vector_storage(tmp_iwork),
+ traits::vector_storage(ifail), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( itype, jobz, range, n, a, b, vl, vu, il, iu, abstol, m, w, z,
+ ifail, info, workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 8*n );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return 5*n;
+ }
+};
+
+
+// template function to call sygvx
+template< typename MatrixA, typename MatrixB, typename VectorW,
+ typename MatrixZ, typename VectorIFAIL, typename Workspace >
+inline integer_t sygvx( integer_t const itype, char const jobz,
+ char const range, integer_t const n, MatrixA& a, MatrixB& b,
+ typename traits::matrix_traits< MatrixA >::value_type const vl,
+ typename traits::matrix_traits< MatrixA >::value_type const vu,
+ integer_t const il, integer_t const iu,
+ typename traits::matrix_traits< MatrixA >::value_type const abstol,
+ integer_t& m, VectorW& w, MatrixZ& z, VectorIFAIL& ifail,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sygvx_impl< value_type >::compute( itype, jobz, range, n, a, b, vl,
+ vu, il, iu, abstol, m, w, z, ifail, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sysv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sysv.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,208 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYSV_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYSV_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sysv( char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda,
+ integer_t* ipiv, float* b, integer_t const ldb, float* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_SSYSV( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ }
+ inline void sysv( char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda,
+ integer_t* ipiv, double* b, integer_t const ldb, double* work,
+ integer_t const lwork, integer_t& info ) {
+ LAPACK_DSYSV( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ }
+ inline void sysv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_f* b, integer_t const ldb,
+ traits::complex_f* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_CSYSV( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+ inline void sysv( char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ integer_t* ipiv, traits::complex_d* b, integer_t const ldb,
+ traits::complex_d* work, integer_t const lwork, integer_t& info ) {
+ LAPACK_ZSYSV( &uplo, &n, &nrhs, traits::complex_ptr(a), &lda, ipiv,
+ traits::complex_ptr(b), &ldb, traits::complex_ptr(work),
+ &lwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct sysv_impl{};
+
+// real specialization
+template< typename ValueType >
+struct sysv_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_work( )));
+#endif
+ detail::sysv( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work( ) );
+ compute( a, ipiv, b, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, optimal_workspace work ) {
+ real_type opt_size_work;
+ detail::sysv( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), &opt_size_work, -1, info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, b, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( ) {
+ return 1;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct sysv_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename WORK >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, detail::workspace1< WORK > work ) {
+#ifndef NDEBUG
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(b) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( )));
+#endif
+ detail::sysv( traits::matrix_uplo_tag(a), traits::matrix_size2(a),
+ traits::matrix_size2(b), traits::matrix_storage(a),
+ traits::leading_dimension(a), traits::vector_storage(ipiv),
+ traits::matrix_storage(b), traits::leading_dimension(b),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work( ) );
+ compute( a, ipiv, b, info, workspace( tmp_work ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename VectorIPIV, typename MatrixB >
+ static void compute( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ integer_t& info, optimal_workspace work ) {
+ value_type opt_size_work;
+ detail::sysv( traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(b),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), &opt_size_work, -1, info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( a, ipiv, b, info, workspace( tmp_work ) );
+ }
+
+ static integer_t min_size_work( ) {
+ return 1;
+ }
+};
+
+
+// template function to call sysv
+template< typename MatrixA, typename VectorIPIV, typename MatrixB,
+ typename Workspace >
+inline integer_t sysv( MatrixA& a, VectorIPIV& ipiv, MatrixB& b,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sysv_impl< value_type >::compute( a, ipiv, b, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sysvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sysvx.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,305 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SYSVX_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SYSVX_HPP
+
+#include <boost/numeric/bindings/lapack/lapack.h>
+#include <boost/numeric/bindings/lapack/workspace.hpp>
+#include <boost/numeric/bindings/traits/detail/array.hpp>
+#include <boost/numeric/bindings/traits/detail/utils.hpp>
+#include <boost/numeric/bindings/traits/is_complex.hpp>
+#include <boost/numeric/bindings/traits/is_real.hpp>
+#include <boost/numeric/bindings/traits/traits.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <cassert>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace lapack {
+
+//$DESCRIPTION
+
+// overloaded functions to call lapack
+namespace detail {
+ inline void sysvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, float* a, integer_t const lda, float* af,
+ integer_t const ldaf, integer_t* ipiv, float* b,
+ integer_t const ldb, float* x, integer_t const ldx, float& rcond,
+ float* ferr, float* berr, float* work, integer_t const lwork,
+ integer_t* iwork, integer_t& info ) {
+ LAPACK_SSYSVX( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, &rcond, ferr, berr, work, &lwork, iwork,
+ &info );
+ }
+ inline void sysvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, double* a, integer_t const lda, double* af,
+ integer_t const ldaf, integer_t* ipiv, double* b,
+ integer_t const ldb, double* x, integer_t const ldx,
+ double& rcond, double* ferr, double* berr, double* work,
+ integer_t const lwork, integer_t* iwork, integer_t& info ) {
+ LAPACK_DSYSVX( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, &rcond, ferr, berr, work, &lwork, iwork,
+ &info );
+ }
+ inline void sysvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_f* a, integer_t const lda,
+ traits::complex_f* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_f* b, integer_t const ldb, traits::complex_f* x,
+ integer_t const ldx, float& rcond, float* ferr, float* berr,
+ traits::complex_f* work, integer_t const lwork, float* rwork,
+ integer_t& info ) {
+ LAPACK_CSYSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+ inline void sysvx( char const fact, char const uplo, integer_t const n,
+ integer_t const nrhs, traits::complex_d* a, integer_t const lda,
+ traits::complex_d* af, integer_t const ldaf, integer_t* ipiv,
+ traits::complex_d* b, integer_t const ldb, traits::complex_d* x,
+ integer_t const ldx, double& rcond, double* ferr, double* berr,
+ traits::complex_d* work, integer_t const lwork, double* rwork,
+ integer_t& info ) {
+ LAPACK_ZSYSVX( &fact, &uplo, &n, &nrhs, traits::complex_ptr(a), &lda,
+ traits::complex_ptr(af), &ldaf, ipiv, traits::complex_ptr(b),
+ &ldb, traits::complex_ptr(x), &ldx, &rcond, ferr, berr,
+ traits::complex_ptr(work), &lwork, rwork, &info );
+ }
+}
+
+// value-type based template
+template< typename ValueType, typename Enable = void >
+struct sysvx_impl{};
+
+// real specialization
+template< typename ValueType >
+struct sysvx_impl< ValueType, typename boost::enable_if< traits::is_real<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename IWORK >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, IWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(real_type()) >= min_size_work(
+ traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(integer_t()) >=
+ min_size_iwork( traits::matrix_size2(a) )));
+#endif
+ detail::sysvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(real_type())),
+ traits::vector_size(work.select(real_type())),
+ traits::vector_storage(work.select(integer_t())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< real_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, a, af, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ real_type opt_size_work;
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
+ traits::matrix_size2(a) ) );
+ detail::sysvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ &opt_size_work, -1, traits::vector_storage(tmp_iwork), info );
+ traits::detail::array< real_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( fact, a, af, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_iwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 3*n );
+ }
+
+ static integer_t min_size_iwork( integer_t const n ) {
+ return n;
+ }
+};
+
+// complex specialization
+template< typename ValueType >
+struct sysvx_impl< ValueType, typename boost::enable_if< traits::is_complex<ValueType> >::type > {
+
+ typedef ValueType value_type;
+ typedef typename traits::type_traits<ValueType>::real_type real_type;
+
+ // user-defined workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename WORK, typename RWORK >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ detail::workspace2< WORK, RWORK > work ) {
+#ifndef NDEBUG
+ assert( fact == 'F' || fact == 'N' );
+ assert( traits::matrix_uplo_tag(a) == 'U' ||
+ traits::matrix_uplo_tag(a) == 'L' );
+ assert( traits::matrix_size2(a) >= 0 );
+ assert( traits::matrix_size2(x) >= 0 );
+ assert( traits::leading_dimension(a) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(af) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(b) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::leading_dimension(x) >= std::max(1,
+ traits::matrix_size2(a)) );
+ assert( traits::vector_size(berr) >= traits::matrix_size2(x) );
+ assert( traits::vector_size(work.select(value_type()) >=
+ min_size_work( traits::matrix_size2(a) )));
+ assert( traits::vector_size(work.select(real_type()) >=
+ min_size_rwork( traits::matrix_size2(a) )));
+#endif
+ detail::sysvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ traits::vector_storage(work.select(value_type())),
+ traits::vector_size(work.select(value_type())),
+ traits::vector_storage(work.select(real_type())), info );
+ }
+
+ // minimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ minimal_workspace work ) {
+ traits::detail::array< value_type > tmp_work( min_size_work(
+ traits::matrix_size2(a) ) );
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ compute( fact, a, af, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ // optimal workspace specialization
+ template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR >
+ static void compute( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x, real_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr, integer_t& info,
+ optimal_workspace work ) {
+ value_type opt_size_work;
+ traits::detail::array< real_type > tmp_rwork( min_size_rwork(
+ traits::matrix_size2(a) ) );
+ detail::sysvx( fact, traits::matrix_uplo_tag(a),
+ traits::matrix_size2(a), traits::matrix_size2(x),
+ traits::matrix_storage(a), traits::leading_dimension(a),
+ traits::matrix_storage(af), traits::leading_dimension(af),
+ traits::vector_storage(ipiv), traits::matrix_storage(b),
+ traits::leading_dimension(b), traits::matrix_storage(x),
+ traits::leading_dimension(x), rcond,
+ traits::vector_storage(ferr), traits::vector_storage(berr),
+ &opt_size_work, -1, traits::vector_storage(tmp_rwork), info );
+ traits::detail::array< value_type > tmp_work(
+ traits::detail::to_int( opt_size_work ) );
+ compute( fact, a, af, ipiv, b, x, rcond, ferr, berr, info,
+ workspace( tmp_work, tmp_rwork ) );
+ }
+
+ static integer_t min_size_work( integer_t const n ) {
+ return std::max( 1, 2*n );
+ }
+
+ static integer_t min_size_rwork( integer_t const n ) {
+ return n;
+ }
+};
+
+
+// template function to call sysvx
+template< typename MatrixA, typename MatrixAF, typename VectorIPIV,
+ typename MatrixB, typename MatrixX, typename VectorFERR,
+ typename VectorBERR, typename Workspace >
+inline integer_t sysvx( char const fact, MatrixA& a, MatrixAF& af,
+ VectorIPIV& ipiv, MatrixB& b, MatrixX& x,
+ typename traits::matrix_traits< MatrixA >::value_type& rcond,
+ VectorFERR& ferr, VectorBERR& berr,
+ Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ integer_t info(0);
+ sysvx_impl< value_type >::compute( fact, a, af, ipiv, b, x, rcond,
+ ferr, berr, info, work );
+ return info;
+}
+
+
+}}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/lapack.h
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/lapack.h 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,3599 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LAPACK_H
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LAPACK_H
+
+#include <boost/numeric/bindings/traits/type.h>
+#include <boost/numeric/bindings/lapack/lapack_names.h>
+
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+# define BOOST_NUMERIC_BINDINGS_FORTRAN
+#endif
+
+extern "C" {
+
+//
+// LAPACK computational routines
+//
+
+// Value-type variants of hbgst
+void LAPACK_CHBGST( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, fcomplex_t* ab,
+ integer_t const* ldab, fcomplex_t const* bb, integer_t const* ldbb,
+ fcomplex_t* x, integer_t const* ldx, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZHBGST( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, dcomplex_t* ab,
+ integer_t const* ldab, dcomplex_t const* bb, integer_t const* ldbb,
+ dcomplex_t* x, integer_t const* ldx, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of hegst
+void LAPACK_CHEGST( integer_t const* itype, char const* uplo,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZHEGST( integer_t const* itype, char const* uplo,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of pbstf
+void LAPACK_SPBSTF( char const* uplo, integer_t const* n, integer_t const* kd,
+ float* ab, integer_t const* ldab, integer_t* info );
+void LAPACK_DPBSTF( char const* uplo, integer_t const* n, integer_t const* kd,
+ double* ab, integer_t const* ldab, integer_t* info );
+void LAPACK_CPBSTF( char const* uplo, integer_t const* n, integer_t const* kd,
+ fcomplex_t* ab, integer_t const* ldab, integer_t* info );
+void LAPACK_ZPBSTF( char const* uplo, integer_t const* n, integer_t const* kd,
+ dcomplex_t* ab, integer_t const* ldab, integer_t* info );
+
+// Value-type variants of sbgst
+void LAPACK_SSBGST( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, float* ab,
+ integer_t const* ldab, float const* bb, integer_t const* ldbb,
+ float* x, integer_t const* ldx, float* work, integer_t* info );
+void LAPACK_DSBGST( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, double* ab,
+ integer_t const* ldab, double const* bb, integer_t const* ldbb,
+ double* x, integer_t const* ldx, double* work, integer_t* info );
+
+// Value-type variants of sygst
+void LAPACK_SSYGST( integer_t const* itype, char const* uplo,
+ integer_t const* n, float* a, integer_t const* lda, float const* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DSYGST( integer_t const* itype, char const* uplo,
+ integer_t const* n, double* a, integer_t const* lda, double const* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of ggqrf
+void LAPACK_SGGQRF( integer_t const* n, integer_t const* m,
+ integer_t const* p, float* a, integer_t const* lda, float* taua,
+ float* b, integer_t const* ldb, float* taub, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGGQRF( integer_t const* n, integer_t const* m,
+ integer_t const* p, double* a, integer_t const* lda, double* taua,
+ double* b, integer_t const* ldb, double* taub, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGGQRF( integer_t const* n, integer_t const* m,
+ integer_t const* p, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* taua, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* taub, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGGQRF( integer_t const* n, integer_t const* m,
+ integer_t const* p, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* taua, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* taub, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ggrqf
+void LAPACK_SGGRQF( integer_t const* m, integer_t const* p,
+ integer_t const* n, float* a, integer_t const* lda, float* taua,
+ float* b, integer_t const* ldb, float* taub, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGGRQF( integer_t const* m, integer_t const* p,
+ integer_t const* n, double* a, integer_t const* lda, double* taua,
+ double* b, integer_t const* ldb, double* taub, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGGRQF( integer_t const* m, integer_t const* p,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* taua, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* taub, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGGRQF( integer_t const* m, integer_t const* p,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* taua, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* taub, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of gelqf
+void LAPACK_SGELQF( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, float* tau, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGELQF( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGELQF( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* tau, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZGELQF( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* tau, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of geqlf
+void LAPACK_SGEQLF( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, float* tau, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGEQLF( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGEQLF( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* tau, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZGEQLF( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* tau, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of geqp3
+void LAPACK_SGEQP3( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, integer_t* jpvt, float* tau, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGEQP3( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* jpvt, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGEQP3( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* jpvt, fcomplex_t* tau,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* info );
+void LAPACK_ZGEQP3( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* jpvt, dcomplex_t* tau,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* info );
+
+// Value-type variants of geqrf
+void LAPACK_SGEQRF( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, float* tau, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGEQRF( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGEQRF( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* tau, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZGEQRF( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* tau, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of gerqf
+void LAPACK_SGERQF( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, float* tau, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGERQF( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGERQF( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* tau, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZGERQF( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* tau, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of larz
+void LAPACK_SLARZ( char const* side, integer_t const* m, integer_t const* n,
+ integer_t const* l, float const* v, integer_t const* incv,
+ float const* tau, float* c, integer_t const* ldc, float* work );
+void LAPACK_DLARZ( char const* side, integer_t const* m, integer_t const* n,
+ integer_t const* l, double const* v, integer_t const* incv,
+ double const* tau, double* c, integer_t const* ldc, double* work );
+void LAPACK_CLARZ( char const* side, integer_t const* m, integer_t const* n,
+ integer_t const* l, fcomplex_t const* v, integer_t const* incv,
+ fcomplex_t const* tau, fcomplex_t* c, integer_t const* ldc,
+ fcomplex_t* work );
+void LAPACK_ZLARZ( char const* side, integer_t const* m, integer_t const* n,
+ integer_t const* l, dcomplex_t const* v, integer_t const* incv,
+ dcomplex_t const* tau, dcomplex_t* c, integer_t const* ldc,
+ dcomplex_t* work );
+
+// Value-type variants of latrz
+void LAPACK_SLATRZ( integer_t const* m, integer_t const* n,
+ integer_t const* l, float* a, integer_t const* lda, float* tau,
+ float* work );
+void LAPACK_DLATRZ( integer_t const* m, integer_t const* n,
+ integer_t const* l, double* a, integer_t const* lda, double* tau,
+ double* work );
+void LAPACK_CLATRZ( integer_t const* m, integer_t const* n,
+ integer_t const* l, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* tau, fcomplex_t* work );
+void LAPACK_ZLATRZ( integer_t const* m, integer_t const* n,
+ integer_t const* l, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* tau, dcomplex_t* work );
+
+// Value-type variants of orglq
+void LAPACK_SORGLQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, float* a, integer_t const* lda, float const* tau,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DORGLQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, double* a, integer_t const* lda,
+ double const* tau, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of orgql
+void LAPACK_SORGQL( integer_t const* m, integer_t const* n,
+ integer_t const* k, float* a, integer_t const* lda, float const* tau,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DORGQL( integer_t const* m, integer_t const* n,
+ integer_t const* k, double* a, integer_t const* lda,
+ double const* tau, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of orgqr
+void LAPACK_SORGQR( integer_t const* m, integer_t const* n,
+ integer_t const* k, float* a, integer_t const* lda, float const* tau,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DORGQR( integer_t const* m, integer_t const* n,
+ integer_t const* k, double* a, integer_t const* lda,
+ double const* tau, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of orgrq
+void LAPACK_SORGRQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, float* a, integer_t const* lda, float const* tau,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DORGRQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, double* a, integer_t const* lda,
+ double const* tau, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormlq
+void LAPACK_SORMLQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, float const* a,
+ integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMLQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, double const* a,
+ integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormql
+void LAPACK_SORMQL( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, float const* a,
+ integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMQL( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, double const* a,
+ integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormqr
+void LAPACK_SORMQR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, float const* a,
+ integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMQR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, double const* a,
+ integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormrq
+void LAPACK_SORMRQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, float const* a,
+ integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMRQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, double const* a,
+ integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormrz
+void LAPACK_SORMRZ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, integer_t const* l,
+ float const* a, integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMRZ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, integer_t const* l,
+ double const* a, integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of tzrzf
+void LAPACK_STZRZF( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, float* tau, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DTZRZF( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CTZRZF( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* tau, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZTZRZF( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* tau, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of unglq
+void LAPACK_CUNGLQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNGLQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ungql
+void LAPACK_CUNGQL( integer_t const* m, integer_t const* n,
+ integer_t const* k, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNGQL( integer_t const* m, integer_t const* n,
+ integer_t const* k, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ungqr
+void LAPACK_CUNGQR( integer_t const* m, integer_t const* n,
+ integer_t const* k, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNGQR( integer_t const* m, integer_t const* n,
+ integer_t const* k, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ungrq
+void LAPACK_CUNGRQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNGRQ( integer_t const* m, integer_t const* n,
+ integer_t const* k, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmlq
+void LAPACK_CUNMLQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* tau, fcomplex_t* c,
+ integer_t const* ldc, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNMLQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* tau, dcomplex_t* c,
+ integer_t const* ldc, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmql
+void LAPACK_CUNMQL( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* tau, fcomplex_t* c,
+ integer_t const* ldc, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNMQL( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* tau, dcomplex_t* c,
+ integer_t const* ldc, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmqr
+void LAPACK_CUNMQR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* tau, fcomplex_t* c,
+ integer_t const* ldc, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNMQR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* tau, dcomplex_t* c,
+ integer_t const* ldc, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmrq
+void LAPACK_CUNMRQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* tau, fcomplex_t* c,
+ integer_t const* ldc, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNMRQ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* tau, dcomplex_t* c,
+ integer_t const* ldc, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmrz
+void LAPACK_CUNMRZ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, integer_t const* l,
+ fcomplex_t const* a, integer_t const* lda, fcomplex_t const* tau,
+ fcomplex_t* c, integer_t const* ldc, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZUNMRZ( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* k, integer_t const* l,
+ dcomplex_t const* a, integer_t const* lda, dcomplex_t const* tau,
+ dcomplex_t* c, integer_t const* ldc, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of bdsdc
+void LAPACK_SBDSDC( char const* uplo, char const* compq, integer_t const* n,
+ float* d, float* e, float* u, integer_t const* ldu, float* vt,
+ integer_t const* ldvt, float* q, integer_t* iq, float* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DBDSDC( char const* uplo, char const* compq, integer_t const* n,
+ double* d, double* e, double* u, integer_t const* ldu, double* vt,
+ integer_t const* ldvt, double* q, integer_t* iq, double* work,
+ integer_t* iwork, integer_t* info );
+
+// Value-type variants of bdsqr
+void LAPACK_SBDSQR( char const* uplo, integer_t const* n,
+ integer_t const* ncvt, integer_t const* nru, integer_t const* ncc,
+ float* d, float* e, float* vt, integer_t const* ldvt, float* u,
+ integer_t const* ldu, float* c, integer_t const* ldc, float* work,
+ integer_t* info );
+void LAPACK_DBDSQR( char const* uplo, integer_t const* n,
+ integer_t const* ncvt, integer_t const* nru, integer_t const* ncc,
+ double* d, double* e, double* vt, integer_t const* ldvt, double* u,
+ integer_t const* ldu, double* c, integer_t const* ldc, double* work,
+ integer_t* info );
+void LAPACK_CBDSQR( char const* uplo, integer_t const* n,
+ integer_t const* ncvt, integer_t const* nru, integer_t const* ncc,
+ float* d, float* e, fcomplex_t* vt, integer_t const* ldvt,
+ fcomplex_t* u, integer_t const* ldu, fcomplex_t* c,
+ integer_t const* ldc, float* rwork, integer_t* info );
+void LAPACK_ZBDSQR( char const* uplo, integer_t const* n,
+ integer_t const* ncvt, integer_t const* nru, integer_t const* ncc,
+ double* d, double* e, dcomplex_t* vt, integer_t const* ldvt,
+ dcomplex_t* u, integer_t const* ldu, dcomplex_t* c,
+ integer_t const* ldc, double* rwork, integer_t* info );
+
+// Value-type variants of gbbrd
+void LAPACK_SGBBRD( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* ncc, integer_t const* kl, integer_t const* ku,
+ float* ab, integer_t const* ldab, float* d, float* e, float* q,
+ integer_t const* ldq, float* pt, integer_t const* ldpt, float* c,
+ integer_t const* ldc, float* work, integer_t* info );
+void LAPACK_DGBBRD( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* ncc, integer_t const* kl, integer_t const* ku,
+ double* ab, integer_t const* ldab, double* d, double* e, double* q,
+ integer_t const* ldq, double* pt, integer_t const* ldpt, double* c,
+ integer_t const* ldc, double* work, integer_t* info );
+void LAPACK_CGBBRD( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* ncc, integer_t const* kl, integer_t const* ku,
+ fcomplex_t* ab, integer_t const* ldab, float* d, float* e,
+ fcomplex_t* q, integer_t const* ldq, fcomplex_t* pt,
+ integer_t const* ldpt, fcomplex_t* c, integer_t const* ldc,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZGBBRD( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* ncc, integer_t const* kl, integer_t const* ku,
+ dcomplex_t* ab, integer_t const* ldab, double* d, double* e,
+ dcomplex_t* q, integer_t const* ldq, dcomplex_t* pt,
+ integer_t const* ldpt, dcomplex_t* c, integer_t const* ldc,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of gebrd
+void LAPACK_SGEBRD( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, float* d, float* e, float* tauq, float* taup,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DGEBRD( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, double* d, double* e, double* tauq,
+ double* taup, double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGEBRD( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, float* d, float* e, fcomplex_t* tauq,
+ fcomplex_t* taup, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGEBRD( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, double* d, double* e, dcomplex_t* tauq,
+ dcomplex_t* taup, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of labrd
+void LAPACK_SLABRD( integer_t const* m, integer_t const* n,
+ integer_t const* nb, float* a, integer_t const* lda, float* d,
+ float* e, float* tauq, float* taup, float* x, integer_t const* ldx,
+ float* y, integer_t const* ldy );
+void LAPACK_DLABRD( integer_t const* m, integer_t const* n,
+ integer_t const* nb, double* a, integer_t const* lda, double* d,
+ double* e, double* tauq, double* taup, double* x,
+ integer_t const* ldx, double* y, integer_t const* ldy );
+void LAPACK_CLABRD( integer_t const* m, integer_t const* n,
+ integer_t const* nb, fcomplex_t* a, integer_t const* lda, float* d,
+ float* e, fcomplex_t* tauq, fcomplex_t* taup, fcomplex_t* x,
+ integer_t const* ldx, fcomplex_t* y, integer_t const* ldy );
+void LAPACK_ZLABRD( integer_t const* m, integer_t const* n,
+ integer_t const* nb, dcomplex_t* a, integer_t const* lda, double* d,
+ double* e, dcomplex_t* tauq, dcomplex_t* taup, dcomplex_t* x,
+ integer_t const* ldx, dcomplex_t* y, integer_t const* ldy );
+
+// Value-type variants of orgbr
+void LAPACK_SORGBR( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* k, float* a, integer_t const* lda, float const* tau,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DORGBR( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* k, double* a, integer_t const* lda,
+ double const* tau, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormbr
+void LAPACK_SORMBR( char const* vect, char const* side, char const* trans,
+ integer_t const* m, integer_t const* n, integer_t const* k,
+ float const* a, integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMBR( char const* vect, char const* side, char const* trans,
+ integer_t const* m, integer_t const* n, integer_t const* k,
+ double const* a, integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ungbr
+void LAPACK_CUNGBR( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* k, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNGBR( char const* vect, integer_t const* m, integer_t const* n,
+ integer_t const* k, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmbr
+void LAPACK_CUNMBR( char const* vect, char const* side, char const* trans,
+ integer_t const* m, integer_t const* n, integer_t const* k,
+ fcomplex_t const* a, integer_t const* lda, fcomplex_t const* tau,
+ fcomplex_t* c, integer_t const* ldc, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZUNMBR( char const* vect, char const* side, char const* trans,
+ integer_t const* m, integer_t const* n, integer_t const* k,
+ dcomplex_t const* a, integer_t const* lda, dcomplex_t const* tau,
+ dcomplex_t* c, integer_t const* ldc, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of gebak
+void LAPACK_SGEBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, float const* scale,
+ integer_t const* m, float* v, integer_t const* ldv, integer_t* info );
+void LAPACK_DGEBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, double const* scale,
+ integer_t const* m, double* v, integer_t const* ldv, integer_t* info );
+void LAPACK_CGEBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, float const* scale,
+ integer_t const* m, fcomplex_t* v, integer_t const* ldv,
+ integer_t* info );
+void LAPACK_ZGEBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, double const* scale,
+ integer_t const* m, dcomplex_t* v, integer_t const* ldv,
+ integer_t* info );
+
+// Value-type variants of gebal
+void LAPACK_SGEBAL( char const* job, integer_t const* n, float* a,
+ integer_t const* lda, integer_t* ilo, integer_t* ihi, float* scale,
+ integer_t* info );
+void LAPACK_DGEBAL( char const* job, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* ilo, integer_t* ihi, double* scale,
+ integer_t* info );
+void LAPACK_CGEBAL( char const* job, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* ilo, integer_t* ihi, float* scale,
+ integer_t* info );
+void LAPACK_ZGEBAL( char const* job, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* ilo, integer_t* ihi, double* scale,
+ integer_t* info );
+
+// Value-type variants of gehrd
+void LAPACK_SGEHRD( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, float* a, integer_t const* lda, float* tau,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DGEHRD( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, double* a, integer_t const* lda, double* tau,
+ double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGEHRD( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGEHRD( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of hsein
+void LAPACK_SHSEIN( char const* side, char const* eigsrc, char const* initv,
+ logical_t* select, integer_t const* n, float const* h,
+ integer_t const* ldh, float* wr, float const* wi, float* vl,
+ integer_t const* ldvl, float* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, float* work, integer_t* ifaill,
+ integer_t* ifailr, integer_t* info );
+void LAPACK_DHSEIN( char const* side, char const* eigsrc, char const* initv,
+ logical_t* select, integer_t const* n, double const* h,
+ integer_t const* ldh, double* wr, double const* wi, double* vl,
+ integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, double* work, integer_t* ifaill,
+ integer_t* ifailr, integer_t* info );
+void LAPACK_CHSEIN( char const* side, char const* eigsrc, char const* initv,
+ logical_t const* select, integer_t const* n, fcomplex_t const* h,
+ integer_t const* ldh, fcomplex_t* w, fcomplex_t* vl,
+ integer_t const* ldvl, fcomplex_t* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, fcomplex_t* work, float* rwork,
+ integer_t* ifaill, integer_t* ifailr, integer_t* info );
+void LAPACK_ZHSEIN( char const* side, char const* eigsrc, char const* initv,
+ logical_t const* select, integer_t const* n, dcomplex_t const* h,
+ integer_t const* ldh, dcomplex_t* w, dcomplex_t* vl,
+ integer_t const* ldvl, dcomplex_t* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, dcomplex_t* work, double* rwork,
+ integer_t* ifaill, integer_t* ifailr, integer_t* info );
+
+// Value-type variants of hseqr
+void LAPACK_SHSEQR( char const* job, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, float* h,
+ integer_t const* ldh, float* wr, float* wi, float* z,
+ integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DHSEQR( char const* job, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, double* h,
+ integer_t const* ldh, double* wr, double* wi, double* z,
+ integer_t const* ldz, double* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_CHSEQR( char const* job, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, fcomplex_t* h,
+ integer_t const* ldh, fcomplex_t* w, fcomplex_t* z,
+ integer_t const* ldz, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZHSEQR( char const* job, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, dcomplex_t* h,
+ integer_t const* ldh, dcomplex_t* w, dcomplex_t* z,
+ integer_t const* ldz, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of orghr
+void LAPACK_SORGHR( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, float* a, integer_t const* lda,
+ float const* tau, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORGHR( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, double* a, integer_t const* lda,
+ double const* tau, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of ormhr
+void LAPACK_SORMHR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ float const* a, integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMHR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ double const* a, integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of trevc
+void LAPACK_STREVC( char const* side, char const* howmny, logical_t* select,
+ integer_t const* n, float const* t, integer_t const* ldt, float* vl,
+ integer_t const* ldvl, float* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, float* work, integer_t* info );
+void LAPACK_DTREVC( char const* side, char const* howmny, logical_t* select,
+ integer_t const* n, double const* t, integer_t const* ldt, double* vl,
+ integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, double* work, integer_t* info );
+void LAPACK_CTREVC( char const* side, char const* howmny,
+ logical_t const* select, integer_t const* n, fcomplex_t* t,
+ integer_t const* ldt, fcomplex_t* vl, integer_t const* ldvl,
+ fcomplex_t* vr, integer_t const* ldvr, integer_t const* mm,
+ integer_t* m, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZTREVC( char const* side, char const* howmny,
+ logical_t const* select, integer_t const* n, dcomplex_t* t,
+ integer_t const* ldt, dcomplex_t* vl, integer_t const* ldvl,
+ dcomplex_t* vr, integer_t const* ldvr, integer_t const* mm,
+ integer_t* m, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of trexc
+void LAPACK_STREXC( char const* compq, integer_t const* n, float* t,
+ integer_t const* ldt, float* q, integer_t const* ldq, integer_t* ifst,
+ integer_t* ilst, float* work, integer_t* info );
+void LAPACK_DTREXC( char const* compq, integer_t const* n, double* t,
+ integer_t const* ldt, double* q, integer_t const* ldq,
+ integer_t* ifst, integer_t* ilst, double* work, integer_t* info );
+void LAPACK_CTREXC( char const* compq, integer_t const* n, fcomplex_t* t,
+ integer_t const* ldt, fcomplex_t* q, integer_t const* ldq,
+ integer_t const* ifst, integer_t const* ilst, integer_t* info );
+void LAPACK_ZTREXC( char const* compq, integer_t const* n, dcomplex_t* t,
+ integer_t const* ldt, dcomplex_t* q, integer_t const* ldq,
+ integer_t const* ifst, integer_t const* ilst, integer_t* info );
+
+// Value-type variants of trsen
+void LAPACK_CTRSEN( char const* job, char const* compq,
+ logical_t const* select, integer_t const* n, fcomplex_t* t,
+ integer_t const* ldt, fcomplex_t* q, integer_t const* ldq,
+ fcomplex_t* w, integer_t* m, float* s, float* sep, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZTRSEN( char const* job, char const* compq,
+ logical_t const* select, integer_t const* n, dcomplex_t* t,
+ integer_t const* ldt, dcomplex_t* q, integer_t const* ldq,
+ dcomplex_t* w, integer_t* m, double* s, double* sep, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of trsna
+void LAPACK_STRSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, float const* t,
+ integer_t const* ldt, float const* vl, integer_t const* ldvl,
+ float const* vr, integer_t const* ldvr, float* s, float* sep,
+ integer_t const* mm, integer_t* m, float* work,
+ integer_t const* ldwork, integer_t* iwork, integer_t* info );
+void LAPACK_DTRSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, double const* t,
+ integer_t const* ldt, double const* vl, integer_t const* ldvl,
+ double const* vr, integer_t const* ldvr, double* s, double* sep,
+ integer_t const* mm, integer_t* m, double* work,
+ integer_t const* ldwork, integer_t* iwork, integer_t* info );
+void LAPACK_CTRSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, fcomplex_t const* t,
+ integer_t const* ldt, fcomplex_t const* vl, integer_t const* ldvl,
+ fcomplex_t const* vr, integer_t const* ldvr, float* s, float* sep,
+ integer_t const* mm, integer_t* m, fcomplex_t* work,
+ integer_t const* ldwork, float* rwork, integer_t* info );
+void LAPACK_ZTRSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, dcomplex_t const* t,
+ integer_t const* ldt, dcomplex_t const* vl, integer_t const* ldvl,
+ dcomplex_t const* vr, integer_t const* ldvr, double* s, double* sep,
+ integer_t const* mm, integer_t* m, dcomplex_t* work,
+ integer_t const* ldwork, double* rwork, integer_t* info );
+
+// Value-type variants of trsyl
+void LAPACK_STRSYL( char const* trana, char const* tranb,
+ integer_t const* isgn, integer_t const* m, integer_t const* n,
+ float const* a, integer_t const* lda, float const* b,
+ integer_t const* ldb, float* c, integer_t const* ldc, float* scale,
+ integer_t* info );
+void LAPACK_DTRSYL( char const* trana, char const* tranb,
+ integer_t const* isgn, integer_t const* m, integer_t const* n,
+ double const* a, integer_t const* lda, double const* b,
+ integer_t const* ldb, double* c, integer_t const* ldc, double* scale,
+ integer_t* info );
+void LAPACK_CTRSYL( char const* trana, char const* tranb,
+ integer_t const* isgn, integer_t const* m, integer_t const* n,
+ fcomplex_t const* a, integer_t const* lda, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t* c, integer_t const* ldc,
+ float* scale, integer_t* info );
+void LAPACK_ZTRSYL( char const* trana, char const* tranb,
+ integer_t const* isgn, integer_t const* m, integer_t const* n,
+ dcomplex_t const* a, integer_t const* lda, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t* c, integer_t const* ldc,
+ double* scale, integer_t* info );
+
+// Value-type variants of unghr
+void LAPACK_CUNGHR( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t const* tau, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNGHR( integer_t const* n, integer_t const* ilo,
+ integer_t const* ihi, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t const* tau, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of unmhr
+void LAPACK_CUNMHR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ fcomplex_t const* a, integer_t const* lda, fcomplex_t const* tau,
+ fcomplex_t* c, integer_t const* ldc, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZUNMHR( char const* side, char const* trans, integer_t const* m,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ dcomplex_t const* a, integer_t const* lda, dcomplex_t const* tau,
+ dcomplex_t* c, integer_t const* ldc, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of gbcon
+void LAPACK_SGBCON( char const* norm, integer_t const* n, integer_t const* kl,
+ integer_t const* ku, float const* ab, integer_t const* ldab,
+ integer_t const* ipiv, float const* anorm, float* rcond, float* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DGBCON( char const* norm, integer_t const* n, integer_t const* kl,
+ integer_t const* ku, double const* ab, integer_t const* ldab,
+ integer_t const* ipiv, double const* anorm, double* rcond,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CGBCON( char const* norm, integer_t const* n, integer_t const* kl,
+ integer_t const* ku, fcomplex_t const* ab, integer_t const* ldab,
+ integer_t const* ipiv, float const* anorm, float* rcond,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZGBCON( char const* norm, integer_t const* n, integer_t const* kl,
+ integer_t const* ku, dcomplex_t const* ab, integer_t const* ldab,
+ integer_t const* ipiv, double const* anorm, double* rcond,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of gbequ
+void LAPACK_SGBEQU( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, float const* ab,
+ integer_t const* ldab, float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax, integer_t* info );
+void LAPACK_DGBEQU( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, double const* ab,
+ integer_t const* ldab, double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax, integer_t* info );
+void LAPACK_CGBEQU( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, fcomplex_t const* ab,
+ integer_t const* ldab, float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax, integer_t* info );
+void LAPACK_ZGBEQU( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, dcomplex_t const* ab,
+ integer_t const* ldab, double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax, integer_t* info );
+
+// Value-type variants of gbrfs
+void LAPACK_SGBRFS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ float const* ab, integer_t const* ldab, float const* afb,
+ integer_t const* ldafb, integer_t const* ipiv, float const* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DGBRFS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ double const* ab, integer_t const* ldab, double const* afb,
+ integer_t const* ldafb, integer_t const* ipiv, double const* b,
+ integer_t const* ldb, double* x, integer_t const* ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CGBRFS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ fcomplex_t const* ab, integer_t const* ldab, fcomplex_t const* afb,
+ integer_t const* ldafb, integer_t const* ipiv, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t* x, integer_t const* ldx,
+ float* ferr, float* berr, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZGBRFS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ dcomplex_t const* ab, integer_t const* ldab, dcomplex_t const* afb,
+ integer_t const* ldafb, integer_t const* ipiv, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t* x, integer_t const* ldx,
+ double* ferr, double* berr, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of gbtrf
+void LAPACK_SGBTRF( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, float* ab,
+ integer_t const* ldab, integer_t* ipiv, integer_t* info );
+void LAPACK_DGBTRF( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, double* ab,
+ integer_t const* ldab, integer_t* ipiv, integer_t* info );
+void LAPACK_CGBTRF( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, fcomplex_t* ab,
+ integer_t const* ldab, integer_t* ipiv, integer_t* info );
+void LAPACK_ZGBTRF( integer_t const* m, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, dcomplex_t* ab,
+ integer_t const* ldab, integer_t* ipiv, integer_t* info );
+
+// Value-type variants of gbtrs
+void LAPACK_SGBTRS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ float const* ab, integer_t const* ldab, integer_t const* ipiv,
+ float* b, integer_t const* ldb, integer_t* info );
+void LAPACK_DGBTRS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ double const* ab, integer_t const* ldab, integer_t const* ipiv,
+ double* b, integer_t const* ldb, integer_t* info );
+void LAPACK_CGBTRS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ fcomplex_t const* ab, integer_t const* ldab, integer_t const* ipiv,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZGBTRS( char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ dcomplex_t const* ab, integer_t const* ldab, integer_t const* ipiv,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of gecon
+void LAPACK_SGECON( char const* norm, integer_t const* n, float const* a,
+ integer_t const* lda, float const* anorm, float* rcond, float* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DGECON( char const* norm, integer_t const* n, double const* a,
+ integer_t const* lda, double const* anorm, double* rcond,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CGECON( char const* norm, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, float const* anorm, float* rcond,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZGECON( char const* norm, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, double const* anorm, double* rcond,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of geequ
+void LAPACK_SGEEQU( integer_t const* m, integer_t const* n, float const* a,
+ integer_t const* lda, float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax, integer_t* info );
+void LAPACK_DGEEQU( integer_t const* m, integer_t const* n, double const* a,
+ integer_t const* lda, double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax, integer_t* info );
+void LAPACK_CGEEQU( integer_t const* m, integer_t const* n,
+ fcomplex_t const* a, integer_t const* lda, float* r, float* c,
+ float* rowcnd, float* colcnd, float* amax, integer_t* info );
+void LAPACK_ZGEEQU( integer_t const* m, integer_t const* n,
+ dcomplex_t const* a, integer_t const* lda, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax, integer_t* info );
+
+// Value-type variants of gerfs
+void LAPACK_SGERFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda,
+ float const* af, integer_t const* ldaf, integer_t const* ipiv,
+ float const* b, integer_t const* ldb, float* x, integer_t const* ldx,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DGERFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ double const* af, integer_t const* ldaf, integer_t const* ipiv,
+ double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CGERFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* af, integer_t const* ldaf, integer_t const* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* ferr, float* berr, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZGERFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* af, integer_t const* ldaf, integer_t const* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* ferr, double* berr, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of getrf
+void LAPACK_SGETRF( integer_t const* m, integer_t const* n, float* a,
+ integer_t const* lda, integer_t* ipiv, integer_t* info );
+void LAPACK_DGETRF( integer_t const* m, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* ipiv, integer_t* info );
+void LAPACK_CGETRF( integer_t const* m, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, integer_t* info );
+void LAPACK_ZGETRF( integer_t const* m, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, integer_t* info );
+
+// Value-type variants of getri
+void LAPACK_SGETRI( integer_t const* n, float* a, integer_t const* lda,
+ integer_t const* ipiv, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGETRI( integer_t const* n, double* a, integer_t const* lda,
+ integer_t const* ipiv, double* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_CGETRI( integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ integer_t const* ipiv, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGETRI( integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ integer_t const* ipiv, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of getrs
+void LAPACK_SGETRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda,
+ integer_t const* ipiv, float* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_DGETRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ integer_t const* ipiv, double* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_CGETRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ integer_t const* ipiv, fcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_ZGETRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ integer_t const* ipiv, dcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+
+// Value-type variants of gtrfs
+void LAPACK_SGTRFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, float const* dl, float const* d,
+ float const* du, float const* dlf, float const* df, float const* duf,
+ float const* du2, integer_t const* ipiv, float const* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DGTRFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, double const* dl, double const* d,
+ double const* du, double const* dlf, double const* df,
+ double const* duf, double const* du2, integer_t const* ipiv,
+ double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CGTRFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* dl, fcomplex_t const* d,
+ fcomplex_t const* du, fcomplex_t const* dlf, fcomplex_t const* df,
+ fcomplex_t const* duf, fcomplex_t const* du2, integer_t const* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* ferr, float* berr, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZGTRFS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* dl, dcomplex_t const* d,
+ dcomplex_t const* du, dcomplex_t const* dlf, dcomplex_t const* df,
+ dcomplex_t const* duf, dcomplex_t const* du2, integer_t const* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* ferr, double* berr, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of gttrs
+void LAPACK_SGTTRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, float const* dl, float const* d,
+ float const* du, float const* du2, integer_t const* ipiv, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DGTTRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, double const* dl, double const* d,
+ double const* du, double const* du2, integer_t const* ipiv, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CGTTRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* dl, fcomplex_t const* d,
+ fcomplex_t const* du, fcomplex_t const* du2, integer_t const* ipiv,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZGTTRS( char const* trans, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* dl, dcomplex_t const* d,
+ dcomplex_t const* du, dcomplex_t const* du2, integer_t const* ipiv,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of hecon
+void LAPACK_CHECON( char const* uplo, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, integer_t const* ipiv, float const* anorm,
+ float* rcond, fcomplex_t* work, integer_t* info );
+void LAPACK_ZHECON( char const* uplo, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, integer_t const* ipiv, double const* anorm,
+ double* rcond, dcomplex_t* work, integer_t* info );
+
+// Value-type variants of herfs
+void LAPACK_CHERFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* af, integer_t const* ldaf, integer_t const* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* ferr, float* berr, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZHERFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* af, integer_t const* ldaf, integer_t const* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* ferr, double* berr, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of hetrf
+void LAPACK_CHETRF( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZHETRF( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of hetri
+void LAPACK_CHETRI( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t const* ipiv, fcomplex_t* work,
+ integer_t* info );
+void LAPACK_ZHETRI( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t const* ipiv, dcomplex_t* work,
+ integer_t* info );
+
+// Value-type variants of hetrs
+void LAPACK_CHETRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ integer_t const* ipiv, fcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_ZHETRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ integer_t const* ipiv, dcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+
+// Value-type variants of hprfs
+void LAPACK_CHPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, fcomplex_t const* afp,
+ integer_t const* ipiv, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZHPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, dcomplex_t const* afp,
+ integer_t const* ipiv, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of hptrs
+void LAPACK_CHPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, integer_t const* ipiv,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZHPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, integer_t const* ipiv,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of lacon
+void LAPACK_SLACON( integer_t const* n, float* v, float* x, integer_t* isgn,
+ float* est, integer_t* kase );
+void LAPACK_DLACON( integer_t const* n, double* v, double* x, integer_t* isgn,
+ double* est, integer_t* kase );
+void LAPACK_CLACON( integer_t const* n, fcomplex_t* v, fcomplex_t* x,
+ float* est, integer_t* kase );
+void LAPACK_ZLACON( integer_t const* n, dcomplex_t* v, dcomplex_t* x,
+ double* est, integer_t* kase );
+
+// Value-type variants of latrs
+void LAPACK_SLATRS( char const* uplo, char const* trans, char const* diag,
+ char const* normin, integer_t const* n, float const* a,
+ integer_t const* lda, float* x, float* scale, float* cnorm,
+ integer_t* info );
+void LAPACK_DLATRS( char const* uplo, char const* trans, char const* diag,
+ char const* normin, integer_t const* n, double const* a,
+ integer_t const* lda, double* x, double* scale, double* cnorm,
+ integer_t* info );
+void LAPACK_CLATRS( char const* uplo, char const* trans, char const* diag,
+ char const* normin, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t* x, float* scale, float* cnorm,
+ integer_t* info );
+void LAPACK_ZLATRS( char const* uplo, char const* trans, char const* diag,
+ char const* normin, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t* x, double* scale, double* cnorm,
+ integer_t* info );
+
+// Value-type variants of pbcon
+void LAPACK_SPBCON( char const* uplo, integer_t const* n, integer_t const* kd,
+ float const* ab, integer_t const* ldab, float const* anorm,
+ float* rcond, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DPBCON( char const* uplo, integer_t const* n, integer_t const* kd,
+ double const* ab, integer_t const* ldab, double const* anorm,
+ double* rcond, double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CPBCON( char const* uplo, integer_t const* n, integer_t const* kd,
+ fcomplex_t const* ab, integer_t const* ldab, float const* anorm,
+ float* rcond, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZPBCON( char const* uplo, integer_t const* n, integer_t const* kd,
+ dcomplex_t const* ab, integer_t const* ldab, double const* anorm,
+ double* rcond, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of pbequ
+void LAPACK_SPBEQU( char const* uplo, integer_t const* n, integer_t const* kd,
+ float const* ab, integer_t const* ldab, float* s, float* scond,
+ float* amax, integer_t* info );
+void LAPACK_DPBEQU( char const* uplo, integer_t const* n, integer_t const* kd,
+ double const* ab, integer_t const* ldab, double* s, double* scond,
+ double* amax, integer_t* info );
+void LAPACK_CPBEQU( char const* uplo, integer_t const* n, integer_t const* kd,
+ fcomplex_t const* ab, integer_t const* ldab, float* s, float* scond,
+ float* amax, integer_t* info );
+void LAPACK_ZPBEQU( char const* uplo, integer_t const* n, integer_t const* kd,
+ dcomplex_t const* ab, integer_t const* ldab, double* s, double* scond,
+ double* amax, integer_t* info );
+
+// Value-type variants of pbrfs
+void LAPACK_SPBRFS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, float const* ab, integer_t const* ldab,
+ float const* afb, integer_t const* ldafb, float const* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DPBRFS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, double const* ab, integer_t const* ldab,
+ double const* afb, integer_t const* ldafb, double const* b,
+ integer_t const* ldb, double* x, integer_t const* ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CPBRFS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, fcomplex_t const* ab, integer_t const* ldab,
+ fcomplex_t const* afb, integer_t const* ldafb, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t* x, integer_t const* ldx,
+ float* ferr, float* berr, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZPBRFS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, dcomplex_t const* ab, integer_t const* ldab,
+ dcomplex_t const* afb, integer_t const* ldafb, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t* x, integer_t const* ldx,
+ double* ferr, double* berr, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of pbtrf
+void LAPACK_SPBTRF( char const* uplo, integer_t const* n, integer_t const* kd,
+ float* ab, integer_t const* ldab, integer_t* info );
+void LAPACK_DPBTRF( char const* uplo, integer_t const* n, integer_t const* kd,
+ double* ab, integer_t const* ldab, integer_t* info );
+void LAPACK_CPBTRF( char const* uplo, integer_t const* n, integer_t const* kd,
+ fcomplex_t* ab, integer_t const* ldab, integer_t* info );
+void LAPACK_ZPBTRF( char const* uplo, integer_t const* n, integer_t const* kd,
+ dcomplex_t* ab, integer_t const* ldab, integer_t* info );
+
+// Value-type variants of pbtrs
+void LAPACK_SPBTRS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, float const* ab, integer_t const* ldab,
+ float* b, integer_t const* ldb, integer_t* info );
+void LAPACK_DPBTRS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, double const* ab, integer_t const* ldab,
+ double* b, integer_t const* ldb, integer_t* info );
+void LAPACK_CPBTRS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, fcomplex_t const* ab, integer_t const* ldab,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZPBTRS( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, dcomplex_t const* ab, integer_t const* ldab,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of pocon
+void LAPACK_SPOCON( char const* uplo, integer_t const* n, float const* a,
+ integer_t const* lda, float const* anorm, float* rcond, float* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DPOCON( char const* uplo, integer_t const* n, double const* a,
+ integer_t const* lda, double const* anorm, double* rcond,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CPOCON( char const* uplo, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, float const* anorm, float* rcond,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZPOCON( char const* uplo, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, double const* anorm, double* rcond,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of poequ
+void LAPACK_SPOEQU( integer_t const* n, float const* a, integer_t const* lda,
+ float* s, float* scond, float* amax, integer_t* info );
+void LAPACK_DPOEQU( integer_t const* n, double const* a, integer_t const* lda,
+ double* s, double* scond, double* amax, integer_t* info );
+void LAPACK_CPOEQU( integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, float* s, float* scond, float* amax,
+ integer_t* info );
+void LAPACK_ZPOEQU( integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, double* s, double* scond, double* amax,
+ integer_t* info );
+
+// Value-type variants of porfs
+void LAPACK_SPORFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda,
+ float const* af, integer_t const* ldaf, float const* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* ferr,
+ float* berr, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DPORFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ double const* af, integer_t const* ldaf, double const* b,
+ integer_t const* ldb, double* x, integer_t const* ldx, double* ferr,
+ double* berr, double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CPORFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* af, integer_t const* ldaf, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t* x, integer_t const* ldx,
+ float* ferr, float* berr, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZPORFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* af, integer_t const* ldaf, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t* x, integer_t const* ldx,
+ double* ferr, double* berr, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of potrf
+void LAPACK_SPOTRF( char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, integer_t* info );
+void LAPACK_DPOTRF( char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* info );
+void LAPACK_CPOTRF( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* info );
+void LAPACK_ZPOTRF( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* info );
+
+// Value-type variants of potri
+void LAPACK_SPOTRI( char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, integer_t* info );
+void LAPACK_DPOTRI( char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* info );
+void LAPACK_CPOTRI( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* info );
+void LAPACK_ZPOTRI( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* info );
+
+// Value-type variants of potrs
+void LAPACK_SPOTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DPOTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ double* b, integer_t const* ldb, integer_t* info );
+void LAPACK_CPOTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZPOTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of pprfs
+void LAPACK_SPPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* ap, float const* afp,
+ float const* b, integer_t const* ldb, float* x, integer_t const* ldx,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DPPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* ap, double const* afp,
+ double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CPPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, fcomplex_t const* afp,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* ferr, float* berr, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZPPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, dcomplex_t const* afp,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* ferr, double* berr, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of pptrs
+void LAPACK_SPPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* ap, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DPPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* ap, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CPPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZPPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of ptrfs
+void LAPACK_SPTRFS( integer_t const* n, integer_t const* nrhs, float const* d,
+ float const* e, float const* df, float const* ef, float const* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* ferr,
+ float* berr, float* work, integer_t* info );
+void LAPACK_DPTRFS( integer_t const* n, integer_t const* nrhs,
+ double const* d, double const* e, double const* df, double const* ef,
+ double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* ferr, double* berr, double* work,
+ integer_t* info );
+void LAPACK_CPTRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* d, fcomplex_t const* e,
+ float const* df, fcomplex_t const* ef, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t* x, integer_t const* ldx,
+ float* ferr, float* berr, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZPTRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* d, dcomplex_t const* e,
+ double const* df, dcomplex_t const* ef, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t* x, integer_t const* ldx,
+ double* ferr, double* berr, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of pttrs
+void LAPACK_SPTTRS( integer_t const* n, integer_t const* nrhs, float const* d,
+ float const* e, float* b, integer_t const* ldb, integer_t* info );
+void LAPACK_DPTTRS( integer_t const* n, integer_t const* nrhs,
+ double const* d, double const* e, double* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_CPTTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* d, fcomplex_t const* e,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZPTTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* d, dcomplex_t const* e,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of sprfs
+void LAPACK_SSPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* ap, float const* afp,
+ integer_t const* ipiv, float const* b, integer_t const* ldb, float* x,
+ integer_t const* ldx, float* ferr, float* berr, float* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DSPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* ap, double const* afp,
+ integer_t const* ipiv, double const* b, integer_t const* ldb,
+ double* x, integer_t const* ldx, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CSPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, fcomplex_t const* afp,
+ integer_t const* ipiv, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZSPRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, dcomplex_t const* afp,
+ integer_t const* ipiv, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of sptrs
+void LAPACK_SSPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* ap, integer_t const* ipiv,
+ float* b, integer_t const* ldb, integer_t* info );
+void LAPACK_DSPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* ap, integer_t const* ipiv,
+ double* b, integer_t const* ldb, integer_t* info );
+void LAPACK_CSPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, integer_t const* ipiv,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZSPTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, integer_t const* ipiv,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of sycon
+void LAPACK_SSYCON( char const* uplo, integer_t const* n, float const* a,
+ integer_t const* lda, integer_t const* ipiv, float const* anorm,
+ float* rcond, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DSYCON( char const* uplo, integer_t const* n, double const* a,
+ integer_t const* lda, integer_t const* ipiv, double const* anorm,
+ double* rcond, double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CSYCON( char const* uplo, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, integer_t const* ipiv, float const* anorm,
+ float* rcond, fcomplex_t* work, integer_t* info );
+void LAPACK_ZSYCON( char const* uplo, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, integer_t const* ipiv, double const* anorm,
+ double* rcond, dcomplex_t* work, integer_t* info );
+
+// Value-type variants of syrfs
+void LAPACK_SSYRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda,
+ float const* af, integer_t const* ldaf, integer_t const* ipiv,
+ float const* b, integer_t const* ldb, float* x, integer_t const* ldx,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DSYRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ double const* af, integer_t const* ldaf, integer_t const* ipiv,
+ double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CSYRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t const* af, integer_t const* ldaf, integer_t const* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* ferr, float* berr, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZSYRFS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t const* af, integer_t const* ldaf, integer_t const* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* ferr, double* berr, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of sytrf
+void LAPACK_SSYTRF( char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, integer_t* ipiv, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DSYTRF( char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* ipiv, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CSYTRF( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZSYTRF( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of sytri
+void LAPACK_SSYTRI( char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, integer_t const* ipiv, float* work,
+ integer_t* info );
+void LAPACK_DSYTRI( char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, integer_t const* ipiv, double* work,
+ integer_t* info );
+void LAPACK_CSYTRI( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t const* ipiv, fcomplex_t* work,
+ integer_t* info );
+void LAPACK_ZSYTRI( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t const* ipiv, dcomplex_t* work,
+ integer_t* info );
+
+// Value-type variants of sytrs
+void LAPACK_SSYTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda,
+ integer_t const* ipiv, float* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_DSYTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ integer_t const* ipiv, double* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_CSYTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ integer_t const* ipiv, fcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_ZSYTRS( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ integer_t const* ipiv, dcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+
+// Value-type variants of tbcon
+void LAPACK_STBCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, integer_t const* kd, float const* ab,
+ integer_t const* ldab, float* rcond, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DTBCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, integer_t const* kd, double const* ab,
+ integer_t const* ldab, double* rcond, double* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_CTBCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, integer_t const* kd, fcomplex_t const* ab,
+ integer_t const* ldab, float* rcond, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZTBCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, integer_t const* kd, dcomplex_t const* ab,
+ integer_t const* ldab, double* rcond, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of tbrfs
+void LAPACK_STBRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ float const* ab, integer_t const* ldab, float const* b,
+ integer_t const* ldb, float const* x, integer_t const* ldx,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DTBRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ double const* ab, integer_t const* ldab, double const* b,
+ integer_t const* ldb, double const* x, integer_t const* ldx,
+ double* ferr, double* berr, double* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_CTBRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ fcomplex_t const* ab, integer_t const* ldab, fcomplex_t const* b,
+ integer_t const* ldb, fcomplex_t const* x, integer_t const* ldx,
+ float* ferr, float* berr, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZTBRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ dcomplex_t const* ab, integer_t const* ldab, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t const* x, integer_t const* ldx,
+ double* ferr, double* berr, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of tbtrs
+void LAPACK_STBTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ float const* ab, integer_t const* ldab, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DTBTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ double const* ab, integer_t const* ldab, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CTBTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ fcomplex_t const* ab, integer_t const* ldab, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZTBTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* kd, integer_t const* nrhs,
+ dcomplex_t const* ab, integer_t const* ldab, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of tprfs
+void LAPACK_STPRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, float const* ap,
+ float const* b, integer_t const* ldb, float const* x,
+ integer_t const* ldx, float* ferr, float* berr, float* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DTPRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, double const* ap,
+ double const* b, integer_t const* ldb, double const* x,
+ integer_t const* ldx, double* ferr, double* berr, double* work,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CTPRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, fcomplex_t const* ap,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t const* x,
+ integer_t const* ldx, float* ferr, float* berr, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZTPRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, dcomplex_t const* ap,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t const* x,
+ integer_t const* ldx, double* ferr, double* berr, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of tptrs
+void LAPACK_STPTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, float const* ap, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DTPTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, double const* ap,
+ double* b, integer_t const* ldb, integer_t* info );
+void LAPACK_CTPTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, fcomplex_t const* ap,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZTPTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, dcomplex_t const* ap,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of trcon
+void LAPACK_STRCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, float const* a, integer_t const* lda,
+ float* rcond, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DTRCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, double const* a, integer_t const* lda,
+ double* rcond, double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CTRCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, fcomplex_t const* a, integer_t const* lda,
+ float* rcond, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZTRCON( char const* norm, char const* uplo, char const* diag,
+ integer_t const* n, dcomplex_t const* a, integer_t const* lda,
+ double* rcond, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of trrfs
+void LAPACK_STRRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, float const* a,
+ integer_t const* lda, float const* b, integer_t const* ldb,
+ float const* x, integer_t const* ldx, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DTRRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, double const* a,
+ integer_t const* lda, double const* b, integer_t const* ldb,
+ double const* x, integer_t const* ldx, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CTRRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t const* x, integer_t const* ldx, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZTRRFS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t const* x, integer_t const* ldx, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of trtri
+void LAPACK_STRTRI( char const* uplo, char const* diag, integer_t const* n,
+ float* a, integer_t const* lda, integer_t* info );
+void LAPACK_DTRTRI( char const* uplo, char const* diag, integer_t const* n,
+ double* a, integer_t const* lda, integer_t* info );
+void LAPACK_CTRTRI( char const* uplo, char const* diag, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, integer_t* info );
+void LAPACK_ZTRTRI( char const* uplo, char const* diag, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, integer_t* info );
+
+// Value-type variants of trtrs
+void LAPACK_STRTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, float const* a,
+ integer_t const* lda, float* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_DTRTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, double const* a,
+ integer_t const* lda, double* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_CTRTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_ZTRTRS( char const* uplo, char const* trans, char const* diag,
+ integer_t const* n, integer_t const* nrhs, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+
+// Value-type variants of hbtrd
+void LAPACK_CHBTRD( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* kd, fcomplex_t* ab, integer_t const* ldab, float* d,
+ float* e, fcomplex_t* q, integer_t const* ldq, fcomplex_t* work,
+ integer_t* info );
+void LAPACK_ZHBTRD( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* kd, dcomplex_t* ab, integer_t const* ldab, double* d,
+ double* e, dcomplex_t* q, integer_t const* ldq, dcomplex_t* work,
+ integer_t* info );
+
+// Value-type variants of hetrd
+void LAPACK_CHETRD( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, float* d, float* e, fcomplex_t* tau,
+ fcomplex_t* work, integer_t const* lwork, integer_t* info );
+void LAPACK_ZHETRD( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, double* d, double* e, dcomplex_t* tau,
+ dcomplex_t* work, integer_t const* lwork, integer_t* info );
+
+// Value-type variants of laebz
+void LAPACK_SLAEBZ( integer_t const* ijob, integer_t const* nitmax,
+ integer_t const* n, integer_t const* mmax, integer_t const* minp,
+ integer_t const* nbmin, float const* abstol, float const* reltol,
+ float const* pivmin, float const* d, float const* e, float const* e2,
+ integer_t* nval, float* ab, float* c, integer_t* mout, integer_t* nab,
+ float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DLAEBZ( integer_t const* ijob, integer_t const* nitmax,
+ integer_t const* n, integer_t const* mmax, integer_t const* minp,
+ integer_t const* nbmin, double const* abstol, double const* reltol,
+ double const* pivmin, double const* d, double const* e,
+ double const* e2, integer_t* nval, double* ab, double* c,
+ integer_t* mout, integer_t* nab, double* work, integer_t* iwork,
+ integer_t* info );
+
+// Value-type variants of latrd
+void LAPACK_SLATRD( char const* uplo, integer_t const* n, integer_t const* nb,
+ float* a, integer_t const* lda, float* e, float* tau, float* w,
+ integer_t const* ldw );
+void LAPACK_DLATRD( char const* uplo, integer_t const* n, integer_t const* nb,
+ double* a, integer_t const* lda, double* e, double* tau, double* w,
+ integer_t const* ldw );
+void LAPACK_CLATRD( char const* uplo, integer_t const* n, integer_t const* nb,
+ fcomplex_t* a, integer_t const* lda, float* e, fcomplex_t* tau,
+ fcomplex_t* w, integer_t const* ldw );
+void LAPACK_ZLATRD( char const* uplo, integer_t const* n, integer_t const* nb,
+ dcomplex_t* a, integer_t const* lda, double* e, dcomplex_t* tau,
+ dcomplex_t* w, integer_t const* ldw );
+
+// Value-type variants of opgtr
+void LAPACK_SOPGTR( char const* uplo, integer_t const* n, float const* ap,
+ float const* tau, float* q, integer_t const* ldq, float* work,
+ integer_t* info );
+void LAPACK_DOPGTR( char const* uplo, integer_t const* n, double const* ap,
+ double const* tau, double* q, integer_t const* ldq, double* work,
+ integer_t* info );
+
+// Value-type variants of opmtr
+void LAPACK_SOPMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, float const* ap,
+ float const* tau, float* c, integer_t const* ldc, float* work,
+ integer_t* info );
+void LAPACK_DOPMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, double const* ap,
+ double const* tau, double* c, integer_t const* ldc, double* work,
+ integer_t* info );
+
+// Value-type variants of orgtr
+void LAPACK_SORGTR( char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, float const* tau, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DORGTR( char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, double const* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of ormtr
+void LAPACK_SORMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, float const* a,
+ integer_t const* lda, float const* tau, float* c,
+ integer_t const* ldc, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DORMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, double const* a,
+ integer_t const* lda, double const* tau, double* c,
+ integer_t const* ldc, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of pteqr
+void LAPACK_SPTEQR( char const* compz, integer_t const* n, float* d, float* e,
+ float* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_DPTEQR( char const* compz, integer_t const* n, double* d,
+ double* e, double* z, integer_t const* ldz, double* work,
+ integer_t* info );
+void LAPACK_CPTEQR( char const* compz, integer_t const* n, float* d, float* e,
+ fcomplex_t* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_ZPTEQR( char const* compz, integer_t const* n, double* d,
+ double* e, dcomplex_t* z, integer_t const* ldz, double* work,
+ integer_t* info );
+
+// Value-type variants of sbtrd
+void LAPACK_SSBTRD( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* kd, float* ab, integer_t const* ldab, float* d,
+ float* e, float* q, integer_t const* ldq, float* work,
+ integer_t* info );
+void LAPACK_DSBTRD( char const* vect, char const* uplo, integer_t const* n,
+ integer_t const* kd, double* ab, integer_t const* ldab, double* d,
+ double* e, double* q, integer_t const* ldq, double* work,
+ integer_t* info );
+
+// Value-type variants of stebz
+void LAPACK_SSTEBZ( char const* range, char const* order, integer_t const* n,
+ float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, float const* d,
+ float const* e, integer_t* m, integer_t* nsplit, float* w,
+ integer_t* iblock, integer_t* isplit, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DSTEBZ( char const* range, char const* order, integer_t const* n,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, double const* d,
+ double const* e, integer_t* m, integer_t* nsplit, double* w,
+ integer_t* iblock, integer_t* isplit, double* work, integer_t* iwork,
+ integer_t* info );
+
+// Value-type variants of stedc
+void LAPACK_SSTEDC( char const* compz, integer_t const* n, float* d, float* e,
+ float* z, integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSTEDC( char const* compz, integer_t const* n, double* d,
+ double* e, double* z, integer_t const* ldz, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_CSTEDC( char const* compz, integer_t const* n, float* d, float* e,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_ZSTEDC( char const* compz, integer_t const* n, double* d,
+ double* e, dcomplex_t* z, integer_t const* ldz, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of stegr
+void LAPACK_SSTEGR( char const* jobz, char const* range, integer_t const* n,
+ float* d, float* e, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, float* z, integer_t const* ldz,
+ integer_t* isuppz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSTEGR( char const* jobz, char const* range, integer_t const* n,
+ double* d, double* e, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, double* z, integer_t const* ldz,
+ integer_t* isuppz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_CSTEGR( char const* jobz, char const* range, integer_t const* n,
+ float* d, float* e, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, fcomplex_t* z, integer_t const* ldz,
+ integer_t* isuppz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_ZSTEGR( char const* jobz, char const* range, integer_t const* n,
+ double* d, double* e, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, dcomplex_t* z, integer_t const* ldz,
+ integer_t* isuppz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of stein
+void LAPACK_SSTEIN( integer_t const* n, float const* d, float const* e,
+ integer_t const* m, float const* w, integer_t const* iblock,
+ integer_t const* isplit, float* z, integer_t const* ldz, float* work,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_DSTEIN( integer_t const* n, double const* d, double const* e,
+ integer_t const* m, double const* w, integer_t const* iblock,
+ integer_t const* isplit, double* z, integer_t const* ldz,
+ double* work, integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_CSTEIN( integer_t const* n, float const* d, float const* e,
+ integer_t const* m, float const* w, integer_t const* iblock,
+ integer_t const* isplit, fcomplex_t* z, integer_t const* ldz,
+ float* work, integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_ZSTEIN( integer_t const* n, double const* d, double const* e,
+ integer_t const* m, double const* w, integer_t const* iblock,
+ integer_t const* isplit, dcomplex_t* z, integer_t const* ldz,
+ double* work, integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of steqr
+void LAPACK_SSTEQR( char const* compz, integer_t const* n, float* d, float* e,
+ float* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_DSTEQR( char const* compz, integer_t const* n, double* d,
+ double* e, double* z, integer_t const* ldz, double* work,
+ integer_t* info );
+void LAPACK_CSTEQR( char const* compz, integer_t const* n, float* d, float* e,
+ fcomplex_t* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_ZSTEQR( char const* compz, integer_t const* n, double* d,
+ double* e, dcomplex_t* z, integer_t const* ldz, double* work,
+ integer_t* info );
+
+// Value-type variants of sterf
+void LAPACK_SSTERF( integer_t const* n, float* d, float* e, integer_t* info );
+void LAPACK_DSTERF( integer_t const* n, double* d, double* e,
+ integer_t* info );
+
+// Value-type variants of sytrd
+void LAPACK_SSYTRD( char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, float* d, float* e, float* tau, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DSYTRD( char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, double* d, double* e, double* tau, double* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of ungtr
+void LAPACK_CUNGTR( char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t const* tau, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZUNGTR( char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t const* tau, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of unmtr
+void LAPACK_CUNMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* tau, fcomplex_t* c,
+ integer_t const* ldc, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZUNMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* tau, dcomplex_t* c,
+ integer_t const* ldc, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of upgtr
+void LAPACK_CUPGTR( char const* uplo, integer_t const* n,
+ fcomplex_t const* ap, fcomplex_t const* tau, fcomplex_t* q,
+ integer_t const* ldq, fcomplex_t* work, integer_t* info );
+void LAPACK_ZUPGTR( char const* uplo, integer_t const* n,
+ dcomplex_t const* ap, dcomplex_t const* tau, dcomplex_t* q,
+ integer_t const* ldq, dcomplex_t* work, integer_t* info );
+
+// Value-type variants of upmtr
+void LAPACK_CUPMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, fcomplex_t const* ap,
+ fcomplex_t const* tau, fcomplex_t* c, integer_t const* ldc,
+ fcomplex_t* work, integer_t* info );
+void LAPACK_ZUPMTR( char const* side, char const* uplo, char const* trans,
+ integer_t const* m, integer_t const* n, dcomplex_t const* ap,
+ dcomplex_t const* tau, dcomplex_t* c, integer_t const* ldc,
+ dcomplex_t* work, integer_t* info );
+
+// Value-type variants of ggbak
+void LAPACK_SGGBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, float const* lscale,
+ float const* rscale, integer_t const* m, float* v,
+ integer_t const* ldv, integer_t* info );
+void LAPACK_DGGBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, double const* lscale,
+ double const* rscale, integer_t const* m, double* v,
+ integer_t const* ldv, integer_t* info );
+void LAPACK_CGGBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, float const* lscale,
+ float const* rscale, integer_t const* m, fcomplex_t* v,
+ integer_t const* ldv, integer_t* info );
+void LAPACK_ZGGBAK( char const* job, char const* side, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, double const* lscale,
+ double const* rscale, integer_t const* m, dcomplex_t* v,
+ integer_t const* ldv, integer_t* info );
+
+// Value-type variants of ggbal
+void LAPACK_SGGBAL( char const* job, integer_t const* n, float* a,
+ integer_t const* lda, float* b, integer_t const* ldb, integer_t* ilo,
+ integer_t* ihi, float* lscale, float* rscale, float* work,
+ integer_t* info );
+void LAPACK_DGGBAL( char const* job, integer_t const* n, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb, integer_t* ilo,
+ integer_t* ihi, double* lscale, double* rscale, double* work,
+ integer_t* info );
+void LAPACK_CGGBAL( char const* job, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb,
+ integer_t* ilo, integer_t* ihi, float* lscale, float* rscale,
+ float* work, integer_t* info );
+void LAPACK_ZGGBAL( char const* job, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb,
+ integer_t* ilo, integer_t* ihi, double* lscale, double* rscale,
+ double* work, integer_t* info );
+
+// Value-type variants of gghrd
+void LAPACK_SGGHRD( char const* compq, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, float* a,
+ integer_t const* lda, float* b, integer_t const* ldb, float* q,
+ integer_t const* ldq, float* z, integer_t const* ldz,
+ integer_t* info );
+void LAPACK_DGGHRD( char const* compq, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb, double* q,
+ integer_t const* ldq, double* z, integer_t const* ldz,
+ integer_t* info );
+void LAPACK_CGGHRD( char const* compq, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* q, integer_t const* ldq, fcomplex_t* z,
+ integer_t const* ldz, integer_t* info );
+void LAPACK_ZGGHRD( char const* compq, char const* compz, integer_t const* n,
+ integer_t const* ilo, integer_t const* ihi, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* q, integer_t const* ldq, dcomplex_t* z,
+ integer_t const* ldz, integer_t* info );
+
+// Value-type variants of hgeqz
+void LAPACK_SHGEQZ( char const* job, char const* compq, char const* compz,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ float* h, integer_t const* ldh, float* t, integer_t const* ldt,
+ float* alphar, float* alphai, float* beta, float* q,
+ integer_t const* ldq, float* z, integer_t const* ldz, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DHGEQZ( char const* job, char const* compq, char const* compz,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ double* h, integer_t const* ldh, double* t, integer_t const* ldt,
+ double* alphar, double* alphai, double* beta, double* q,
+ integer_t const* ldq, double* z, integer_t const* ldz, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CHGEQZ( char const* job, char const* compq, char const* compz,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ fcomplex_t* h, integer_t const* ldh, fcomplex_t* t,
+ integer_t const* ldt, fcomplex_t* alpha, fcomplex_t* beta,
+ fcomplex_t* q, integer_t const* ldq, fcomplex_t* z,
+ integer_t const* ldz, fcomplex_t* work, integer_t const* lwork,
+ float* rwork, integer_t* info );
+void LAPACK_ZHGEQZ( char const* job, char const* compq, char const* compz,
+ integer_t const* n, integer_t const* ilo, integer_t const* ihi,
+ dcomplex_t* h, integer_t const* ldh, dcomplex_t* t,
+ integer_t const* ldt, dcomplex_t* alpha, dcomplex_t* beta,
+ dcomplex_t* q, integer_t const* ldq, dcomplex_t* z,
+ integer_t const* ldz, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* info );
+
+// Value-type variants of tgevc
+void LAPACK_STGEVC( char const* side, char const* howmny,
+ logical_t const* select, integer_t const* n, float const* s,
+ integer_t const* lds, float const* p, integer_t const* ldp, float* vl,
+ integer_t const* ldvl, float* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, float* work, integer_t* info );
+void LAPACK_DTGEVC( char const* side, char const* howmny,
+ logical_t const* select, integer_t const* n, double const* s,
+ integer_t const* lds, double const* p, integer_t const* ldp,
+ double* vl, integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ integer_t const* mm, integer_t* m, double* work, integer_t* info );
+void LAPACK_CTGEVC( char const* side, char const* howmny,
+ logical_t const* select, integer_t const* n, fcomplex_t const* s,
+ integer_t const* lds, fcomplex_t const* p, integer_t const* ldp,
+ fcomplex_t* vl, integer_t const* ldvl, fcomplex_t* vr,
+ integer_t const* ldvr, integer_t const* mm, integer_t* m,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZTGEVC( char const* side, char const* howmny,
+ logical_t const* select, integer_t const* n, dcomplex_t const* s,
+ integer_t const* lds, dcomplex_t const* p, integer_t const* ldp,
+ dcomplex_t* vl, integer_t const* ldvl, dcomplex_t* vr,
+ integer_t const* ldvr, integer_t const* mm, integer_t* m,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of tgexc
+void LAPACK_STGEXC( logical_t const* wantq, logical_t const* wantz,
+ integer_t const* n, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* q, integer_t const* ldq, float* z,
+ integer_t const* ldz, integer_t* ifst, integer_t* ilst, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DTGEXC( logical_t const* wantq, logical_t const* wantz,
+ integer_t const* n, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, double* q, integer_t const* ldq, double* z,
+ integer_t const* ldz, integer_t* ifst, integer_t* ilst, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CTGEXC( logical_t const* wantq, logical_t const* wantz,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, fcomplex_t* q,
+ integer_t const* ldq, fcomplex_t* z, integer_t const* ldz,
+ integer_t const* ifst, integer_t* ilst, integer_t* info );
+void LAPACK_ZTGEXC( logical_t const* wantq, logical_t const* wantz,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, dcomplex_t* q,
+ integer_t const* ldq, dcomplex_t* z, integer_t const* ldz,
+ integer_t const* ifst, integer_t* ilst, integer_t* info );
+
+// Value-type variants of tgsen
+void LAPACK_STGSEN( integer_t const* ijob, logical_t const* wantq,
+ logical_t const* wantz, logical_t const* select, integer_t const* n,
+ float* a, integer_t const* lda, float* b, integer_t const* ldb,
+ float* alphar, float* alphai, float* beta, float* q,
+ integer_t const* ldq, float* z, integer_t const* ldz, integer_t* m,
+ float* pl, float* pr, float* dif, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DTGSEN( integer_t const* ijob, logical_t const* wantq,
+ logical_t const* wantz, logical_t const* select, integer_t const* n,
+ double* a, integer_t const* lda, double* b, integer_t const* ldb,
+ double* alphar, double* alphai, double* beta, double* q,
+ integer_t const* ldq, double* z, integer_t const* ldz, integer_t* m,
+ double* pl, double* pr, double* dif, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_CTGSEN( integer_t const* ijob, logical_t const* wantq,
+ logical_t const* wantz, logical_t const* select, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* b,
+ integer_t const* ldb, fcomplex_t* alpha, fcomplex_t* beta,
+ fcomplex_t* q, integer_t const* ldq, fcomplex_t* z,
+ integer_t const* ldz, integer_t* m, float* pl, float* pr, float* dif,
+ fcomplex_t* work, integer_t const* lwork, integer_t* iwork,
+ integer_t const* liwork, integer_t* info );
+void LAPACK_ZTGSEN( integer_t const* ijob, logical_t const* wantq,
+ logical_t const* wantz, logical_t const* select, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* b,
+ integer_t const* ldb, dcomplex_t* alpha, dcomplex_t* beta,
+ dcomplex_t* q, integer_t const* ldq, dcomplex_t* z,
+ integer_t const* ldz, integer_t* m, double* pl, double* pr,
+ double* dif, dcomplex_t* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of tgsna
+void LAPACK_STGSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, float const* a,
+ integer_t const* lda, float const* b, integer_t const* ldb,
+ float const* vl, integer_t const* ldvl, float const* vr,
+ integer_t const* ldvr, float* s, float* dif, integer_t const* mm,
+ integer_t* m, float* work, integer_t const* lwork, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DTGSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, double const* a,
+ integer_t const* lda, double const* b, integer_t const* ldb,
+ double const* vl, integer_t const* ldvl, double const* vr,
+ integer_t const* ldvr, double* s, double* dif, integer_t const* mm,
+ integer_t* m, double* work, integer_t const* lwork, integer_t* iwork,
+ integer_t* info );
+void LAPACK_CTGSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t const* vl, integer_t const* ldvl, fcomplex_t const* vr,
+ integer_t const* ldvr, float* s, float* dif, integer_t const* mm,
+ integer_t* m, fcomplex_t* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_ZTGSNA( char const* job, char const* howmny,
+ logical_t const* select, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t const* vl, integer_t const* ldvl, dcomplex_t const* vr,
+ integer_t const* ldvr, double* s, double* dif, integer_t const* mm,
+ integer_t* m, dcomplex_t* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+
+// Value-type variants of tgsyl
+void LAPACK_STGSYL( char const* trans, integer_t const* ijob,
+ integer_t const* m, integer_t const* n, float const* a,
+ integer_t const* lda, float const* b, integer_t const* ldb, float* c,
+ integer_t const* ldc, float const* d, integer_t const* ldd,
+ float const* e, integer_t const* lde, float* f, integer_t const* ldf,
+ float* scale, float* dif, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DTGSYL( char const* trans, integer_t const* ijob,
+ integer_t const* m, integer_t const* n, double const* a,
+ integer_t const* lda, double const* b, integer_t const* ldb,
+ double* c, integer_t const* ldc, double const* d,
+ integer_t const* ldd, double const* e, integer_t const* lde,
+ double* f, integer_t const* ldf, double* scale, double* dif,
+ double* work, integer_t const* lwork, integer_t* iwork,
+ integer_t* info );
+void LAPACK_CTGSYL( char const* trans, integer_t const* ijob,
+ integer_t const* m, integer_t const* n, fcomplex_t const* a,
+ integer_t const* lda, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t* c, integer_t const* ldc, fcomplex_t const* d,
+ integer_t const* ldd, fcomplex_t const* e, integer_t const* lde,
+ fcomplex_t* f, integer_t const* ldf, float* scale, float* dif,
+ fcomplex_t* work, integer_t const* lwork, integer_t* iwork,
+ integer_t* info );
+void LAPACK_ZTGSYL( char const* trans, integer_t const* ijob,
+ integer_t const* m, integer_t const* n, dcomplex_t const* a,
+ integer_t const* lda, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t* c, integer_t const* ldc, dcomplex_t const* d,
+ integer_t const* ldd, dcomplex_t const* e, integer_t const* lde,
+ dcomplex_t* f, integer_t const* ldf, double* scale, double* dif,
+ dcomplex_t* work, integer_t const* lwork, integer_t* iwork,
+ integer_t* info );
+
+// Value-type variants of ggsvp
+void LAPACK_SGGSVP( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n, float* a,
+ integer_t const* lda, float* b, integer_t const* ldb,
+ float const* tola, float const* tolb, integer_t* k, integer_t* l,
+ float* u, integer_t const* ldu, float* v, integer_t const* ldv,
+ float* q, integer_t const* ldq, integer_t* iwork, float* tau,
+ float* work, integer_t* info );
+void LAPACK_DGGSVP( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb,
+ double const* tola, double const* tolb, integer_t* k, integer_t* l,
+ double* u, integer_t const* ldu, double* v, integer_t const* ldv,
+ double* q, integer_t const* ldq, integer_t* iwork, double* tau,
+ double* work, integer_t* info );
+void LAPACK_CGGSVP( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* b,
+ integer_t const* ldb, float const* tola, float const* tolb,
+ integer_t* k, integer_t* l, fcomplex_t* u, integer_t const* ldu,
+ fcomplex_t* v, integer_t const* ldv, fcomplex_t* q,
+ integer_t const* ldq, integer_t* iwork, float* rwork, fcomplex_t* tau,
+ fcomplex_t* work, integer_t* info );
+void LAPACK_ZGGSVP( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* b,
+ integer_t const* ldb, double const* tola, double const* tolb,
+ integer_t* k, integer_t* l, dcomplex_t* u, integer_t const* ldu,
+ dcomplex_t* v, integer_t const* ldv, dcomplex_t* q,
+ integer_t const* ldq, integer_t* iwork, double* rwork,
+ dcomplex_t* tau, dcomplex_t* work, integer_t* info );
+
+// Value-type variants of tgsja
+void LAPACK_STGSJA( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n,
+ integer_t const* k, integer_t const* l, float* a,
+ integer_t const* lda, float* b, integer_t const* ldb,
+ float const* tola, float const* tolb, float* alpha, float* beta,
+ float* u, integer_t const* ldu, float* v, integer_t const* ldv,
+ float* q, integer_t const* ldq, float* work, integer_t* ncycle,
+ integer_t* info );
+void LAPACK_DTGSJA( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n,
+ integer_t const* k, integer_t const* l, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb,
+ double const* tola, double const* tolb, double* alpha, double* beta,
+ double* u, integer_t const* ldu, double* v, integer_t const* ldv,
+ double* q, integer_t const* ldq, double* work, integer_t* ncycle,
+ integer_t* info );
+void LAPACK_CTGSJA( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n,
+ integer_t const* k, integer_t const* l, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb,
+ float const* tola, float const* tolb, float* alpha, float* beta,
+ fcomplex_t* u, integer_t const* ldu, fcomplex_t* v,
+ integer_t const* ldv, fcomplex_t* q, integer_t const* ldq,
+ fcomplex_t* work, integer_t* ncycle, integer_t* info );
+void LAPACK_ZTGSJA( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* p, integer_t const* n,
+ integer_t const* k, integer_t const* l, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb,
+ double const* tola, double const* tolb, double* alpha, double* beta,
+ dcomplex_t* u, integer_t const* ldu, dcomplex_t* v,
+ integer_t const* ldv, dcomplex_t* q, integer_t const* ldq,
+ dcomplex_t* work, integer_t* ncycle, integer_t* info );
+
+//
+// LAPACK driver routines
+//
+
+// Value-type variants of gegv
+void LAPACK_SGEGV( char const* jobvl, char const* jobvr, integer_t const* n,
+ float* a, integer_t const* lda, float* b, integer_t const* ldb,
+ float* alphar, float* alphai, float* beta, float* vl,
+ integer_t const* ldvl, float* vr, integer_t const* ldvr, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGEGV( char const* jobvl, char const* jobvr, integer_t const* n,
+ double* a, integer_t const* lda, double* b, integer_t const* ldb,
+ double* alphar, double* alphai, double* beta, double* vl,
+ integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGEGV( char const* jobvl, char const* jobvr, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* b,
+ integer_t const* ldb, fcomplex_t* alpha, fcomplex_t* beta,
+ fcomplex_t* vl, integer_t const* ldvl, fcomplex_t* vr,
+ integer_t const* ldvr, fcomplex_t* work, integer_t const* lwork,
+ float* rwork, integer_t* info );
+void LAPACK_ZGEGV( char const* jobvl, char const* jobvr, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* b,
+ integer_t const* ldb, dcomplex_t* alpha, dcomplex_t* beta,
+ dcomplex_t* vl, integer_t const* ldvl, dcomplex_t* vr,
+ integer_t const* ldvr, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* info );
+
+// Value-type variants of gges
+void LAPACK_SGGES( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, integer_t const* n, float* a, integer_t const* lda,
+ float* b, integer_t const* ldb, integer_t* sdim, float* alphar,
+ float* alphai, float* beta, float* vsl, integer_t const* ldvsl,
+ float* vsr, integer_t const* ldvsr, float* work,
+ integer_t const* lwork, logical_t* bwork, integer_t* info );
+void LAPACK_DGGES( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, integer_t const* n, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb,
+ integer_t* sdim, double* alphar, double* alphai, double* beta,
+ double* vsl, integer_t const* ldvsl, double* vsr,
+ integer_t const* ldvsr, double* work, integer_t const* lwork,
+ logical_t* bwork, integer_t* info );
+void LAPACK_CGGES( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb,
+ integer_t* sdim, fcomplex_t* alpha, fcomplex_t* beta, fcomplex_t* vsl,
+ integer_t const* ldvsl, fcomplex_t* vsr, integer_t const* ldvsr,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ logical_t* bwork, integer_t* info );
+void LAPACK_ZGGES( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb,
+ integer_t* sdim, dcomplex_t* alpha, dcomplex_t* beta, dcomplex_t* vsl,
+ integer_t const* ldvsl, dcomplex_t* vsr, integer_t const* ldvsr,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ logical_t* bwork, integer_t* info );
+
+// Value-type variants of ggesx
+void LAPACK_SGGESX( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, char const* sense, integer_t const* n, float* a,
+ integer_t const* lda, float* b, integer_t const* ldb, integer_t* sdim,
+ float* alphar, float* alphai, float* beta, float* vsl,
+ integer_t const* ldvsl, float* vsr, integer_t const* ldvsr,
+ float* rconde, float* rcondv, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, logical_t* bwork,
+ integer_t* info );
+void LAPACK_DGGESX( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, char const* sense, integer_t const* n, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb,
+ integer_t* sdim, double* alphar, double* alphai, double* beta,
+ double* vsl, integer_t const* ldvsl, double* vsr,
+ integer_t const* ldvsr, double* rconde, double* rcondv, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ logical_t* bwork, integer_t* info );
+void LAPACK_CGGESX( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, char const* sense, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* b,
+ integer_t const* ldb, integer_t* sdim, fcomplex_t* alpha,
+ fcomplex_t* beta, fcomplex_t* vsl, integer_t const* ldvsl,
+ fcomplex_t* vsr, integer_t const* ldvsr, float* rconde, float* rcondv,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* iwork, integer_t const* liwork, logical_t* bwork,
+ integer_t* info );
+void LAPACK_ZGGESX( char const* jobvsl, char const* jobvsr, char const* sort,
+ logical_t* selctg, char const* sense, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* b,
+ integer_t const* ldb, integer_t* sdim, dcomplex_t* alpha,
+ dcomplex_t* beta, dcomplex_t* vsl, integer_t const* ldvsl,
+ dcomplex_t* vsr, integer_t const* ldvsr, double* rconde,
+ double* rcondv, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* iwork, integer_t const* liwork,
+ logical_t* bwork, integer_t* info );
+
+// Value-type variants of ggev
+void LAPACK_SGGEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ float* a, integer_t const* lda, float* b, integer_t const* ldb,
+ float* alphar, float* alphai, float* beta, float* vl,
+ integer_t const* ldvl, float* vr, integer_t const* ldvr, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGGEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ double* a, integer_t const* lda, double* b, integer_t const* ldb,
+ double* alphar, double* alphai, double* beta, double* vl,
+ integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGGEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* b,
+ integer_t const* ldb, fcomplex_t* alpha, fcomplex_t* beta,
+ fcomplex_t* vl, integer_t const* ldvl, fcomplex_t* vr,
+ integer_t const* ldvr, fcomplex_t* work, integer_t const* lwork,
+ float* rwork, integer_t* info );
+void LAPACK_ZGGEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* b,
+ integer_t const* ldb, dcomplex_t* alpha, dcomplex_t* beta,
+ dcomplex_t* vl, integer_t const* ldvl, dcomplex_t* vr,
+ integer_t const* ldvr, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* info );
+
+// Value-type variants of ggevx
+void LAPACK_SGGEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, float* a, integer_t const* lda,
+ float* b, integer_t const* ldb, float* alphar, float* alphai,
+ float* beta, float* vl, integer_t const* ldvl, float* vr,
+ integer_t const* ldvr, integer_t* ilo, integer_t* ihi, float* lscale,
+ float* rscale, float* abnrm, float* bbnrm, float* rconde,
+ float* rcondv, float* work, integer_t const* lwork, integer_t* iwork,
+ logical_t* bwork, integer_t* info );
+void LAPACK_DGGEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb, double* alphar,
+ double* alphai, double* beta, double* vl, integer_t const* ldvl,
+ double* vr, integer_t const* ldvr, integer_t* ilo, integer_t* ihi,
+ double* lscale, double* rscale, double* abnrm, double* bbnrm,
+ double* rconde, double* rcondv, double* work, integer_t const* lwork,
+ integer_t* iwork, logical_t* bwork, integer_t* info );
+void LAPACK_CGGEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* alpha, fcomplex_t* beta, fcomplex_t* vl,
+ integer_t const* ldvl, fcomplex_t* vr, integer_t const* ldvr,
+ integer_t* ilo, integer_t* ihi, float* lscale, float* rscale,
+ float* abnrm, float* bbnrm, float* rconde, float* rcondv,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* iwork, logical_t* bwork, integer_t* info );
+void LAPACK_ZGGEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* alpha, dcomplex_t* beta, dcomplex_t* vl,
+ integer_t const* ldvl, dcomplex_t* vr, integer_t const* ldvr,
+ integer_t* ilo, integer_t* ihi, double* lscale, double* rscale,
+ double* abnrm, double* bbnrm, double* rconde, double* rcondv,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* iwork, logical_t* bwork, integer_t* info );
+
+// Value-type variants of ggsvd
+void LAPACK_SGGSVD( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* n, integer_t const* p,
+ integer_t* k, integer_t* l, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* alpha, float* beta, float* u,
+ integer_t const* ldu, float* v, integer_t const* ldv, float* q,
+ integer_t const* ldq, float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DGGSVD( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* n, integer_t const* p,
+ integer_t* k, integer_t* l, double* a, integer_t const* lda,
+ double* b, integer_t const* ldb, double* alpha, double* beta,
+ double* u, integer_t const* ldu, double* v, integer_t const* ldv,
+ double* q, integer_t const* ldq, double* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_CGGSVD( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* n, integer_t const* p,
+ integer_t* k, integer_t* l, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, float* alpha, float* beta,
+ fcomplex_t* u, integer_t const* ldu, fcomplex_t* v,
+ integer_t const* ldv, fcomplex_t* q, integer_t const* ldq,
+ fcomplex_t* work, float* rwork, integer_t* iwork, integer_t* info );
+void LAPACK_ZGGSVD( char const* jobu, char const* jobv, char const* jobq,
+ integer_t const* m, integer_t const* n, integer_t const* p,
+ integer_t* k, integer_t* l, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, double* alpha, double* beta,
+ dcomplex_t* u, integer_t const* ldu, dcomplex_t* v,
+ integer_t const* ldv, dcomplex_t* q, integer_t const* ldq,
+ dcomplex_t* work, double* rwork, integer_t* iwork, integer_t* info );
+
+// Value-type variants of hbgv
+void LAPACK_CHBGV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, fcomplex_t* ab,
+ integer_t const* ldab, fcomplex_t* bb, integer_t const* ldbb,
+ float* w, fcomplex_t* z, integer_t const* ldz, fcomplex_t* work,
+ float* rwork, integer_t* info );
+void LAPACK_ZHBGV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, dcomplex_t* ab,
+ integer_t const* ldab, dcomplex_t* bb, integer_t const* ldbb,
+ double* w, dcomplex_t* z, integer_t const* ldz, dcomplex_t* work,
+ double* rwork, integer_t* info );
+
+// Value-type variants of hbgvd
+void LAPACK_CHBGVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, fcomplex_t* ab,
+ integer_t const* ldab, fcomplex_t* bb, integer_t const* ldbb,
+ float* w, fcomplex_t* z, integer_t const* ldz, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_ZHBGVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, dcomplex_t* ab,
+ integer_t const* ldab, dcomplex_t* bb, integer_t const* ldbb,
+ double* w, dcomplex_t* z, integer_t const* ldz, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of hbgvx
+void LAPACK_CHBGVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* ka, integer_t const* kb,
+ fcomplex_t* ab, integer_t const* ldab, fcomplex_t* bb,
+ integer_t const* ldbb, fcomplex_t* q, integer_t const* ldq,
+ float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, integer_t* m, float* w,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_ZHBGVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* ka, integer_t const* kb,
+ dcomplex_t* ab, integer_t const* ldab, dcomplex_t* bb,
+ integer_t const* ldbb, dcomplex_t* q, integer_t const* ldq,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ dcomplex_t* z, integer_t const* ldz, dcomplex_t* work, double* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of hegv
+void LAPACK_CHEGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, float* w, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t* info );
+void LAPACK_ZHEGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, double* w, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t* info );
+
+// Value-type variants of hegvd
+void LAPACK_CHEGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* b, integer_t const* ldb, float* w,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t const* lrwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_ZHEGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* b, integer_t const* ldb, double* w,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t const* lrwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of hegvx
+void LAPACK_CHEGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* b,
+ integer_t const* ldb, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, fcomplex_t* z, integer_t const* ldz,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_ZHEGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* b,
+ integer_t const* ldb, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, dcomplex_t* z, integer_t const* ldz,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of hpgv
+void LAPACK_CHPGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, fcomplex_t* ap, fcomplex_t* bp, float* w,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZHPGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, dcomplex_t* ap, dcomplex_t* bp, double* w,
+ dcomplex_t* z, integer_t const* ldz, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of hpgvd
+void LAPACK_CHPGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, fcomplex_t* ap, fcomplex_t* bp,
+ float* w, fcomplex_t* z, integer_t const* ldz, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_ZHPGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, dcomplex_t* ap, dcomplex_t* bp,
+ double* w, dcomplex_t* z, integer_t const* ldz, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of hpgvx
+void LAPACK_CHPGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n,
+ fcomplex_t* ap, fcomplex_t* bp, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, fcomplex_t* z, integer_t const* ldz,
+ fcomplex_t* work, float* rwork, integer_t* iwork, integer_t* ifail,
+ integer_t* info );
+void LAPACK_ZHPGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n,
+ dcomplex_t* ap, dcomplex_t* bp, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, dcomplex_t* z, integer_t const* ldz,
+ dcomplex_t* work, double* rwork, integer_t* iwork, integer_t* ifail,
+ integer_t* info );
+
+// Value-type variants of lacgv
+void LAPACK_CLACGV( integer_t const* n, fcomplex_t* x, integer_t const* incx );
+void LAPACK_ZLACGV( integer_t const* n, dcomplex_t* x, integer_t const* incx );
+
+// Value-type variants of largv
+void LAPACK_SLARGV( integer_t const* n, float* x, integer_t const* incx,
+ float* y, integer_t const* incy, float* c, integer_t const* incc );
+void LAPACK_DLARGV( integer_t const* n, double* x, integer_t const* incx,
+ double* y, integer_t const* incy, double* c, integer_t const* incc );
+void LAPACK_CLARGV( integer_t const* n, fcomplex_t* x, integer_t const* incx,
+ fcomplex_t* y, integer_t const* incy, float* c,
+ integer_t const* incc );
+void LAPACK_ZLARGV( integer_t const* n, dcomplex_t* x, integer_t const* incx,
+ dcomplex_t* y, integer_t const* incy, double* c,
+ integer_t const* incc );
+
+// Value-type variants of sbgv
+void LAPACK_SSBGV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, float* ab,
+ integer_t const* ldab, float* bb, integer_t const* ldbb, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_DSBGV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, double* ab,
+ integer_t const* ldab, double* bb, integer_t const* ldbb, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t* info );
+
+// Value-type variants of sbgvd
+void LAPACK_SSBGVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, float* ab,
+ integer_t const* ldab, float* bb, integer_t const* ldbb, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSBGVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* ka, integer_t const* kb, double* ab,
+ integer_t const* ldab, double* bb, integer_t const* ldbb, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of sbgvx
+void LAPACK_SSBGVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* ka, integer_t const* kb,
+ float* ab, integer_t const* ldab, float* bb, integer_t const* ldbb,
+ float* q, integer_t const* ldq, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, float* z, integer_t const* ldz, float* work,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_DSBGVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* ka, integer_t const* kb,
+ double* ab, integer_t const* ldab, double* bb, integer_t const* ldbb,
+ double* q, integer_t const* ldq, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, double* z, integer_t const* ldz,
+ double* work, integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of spgv
+void LAPACK_SSPGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, float* ap, float* bp, float* w, float* z,
+ integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_DSPGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, double* ap, double* bp, double* w, double* z,
+ integer_t const* ldz, double* work, integer_t* info );
+
+// Value-type variants of spgvd
+void LAPACK_SSPGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, float* ap, float* bp, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSPGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, double* ap, double* bp,
+ double* w, double* z, integer_t const* ldz, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of spgvx
+void LAPACK_SSPGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n, float* ap,
+ float* bp, float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, integer_t* m, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t* iwork,
+ integer_t* ifail, integer_t* info );
+void LAPACK_DSPGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n, double* ap,
+ double* bp, double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t* iwork,
+ integer_t* ifail, integer_t* info );
+
+// Value-type variants of sygv
+void LAPACK_SSYGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* w, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DSYGV( integer_t const* itype, char const* jobz, char const* uplo,
+ integer_t const* n, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, double* w, double* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of sygvd
+void LAPACK_SSYGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, float* a, integer_t const* lda,
+ float* b, integer_t const* ldb, float* w, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_DSYGVD( integer_t const* itype, char const* jobz,
+ char const* uplo, integer_t const* n, double* a, integer_t const* lda,
+ double* b, integer_t const* ldb, double* w, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of sygvx
+void LAPACK_SSYGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n, float* a,
+ integer_t const* lda, float* b, integer_t const* ldb, float const* vl,
+ float const* vu, integer_t const* il, integer_t const* iu,
+ float const* abstol, integer_t* m, float* w, float* z,
+ integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_DSYGVX( integer_t const* itype, char const* jobz,
+ char const* range, char const* uplo, integer_t const* n, double* a,
+ integer_t const* lda, double* b, integer_t const* ldb,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of ggglm
+void LAPACK_SGGGLM( integer_t const* n, integer_t const* m,
+ integer_t const* p, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* d, float* x, float* y, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGGGLM( integer_t const* n, integer_t const* m,
+ integer_t const* p, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, double* d, double* x, double* y, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGGGLM( integer_t const* n, integer_t const* m,
+ integer_t const* p, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, fcomplex_t* d, fcomplex_t* x,
+ fcomplex_t* y, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGGGLM( integer_t const* n, integer_t const* m,
+ integer_t const* p, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, dcomplex_t* d, dcomplex_t* x,
+ dcomplex_t* y, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of gglse
+void LAPACK_SGGLSE( integer_t const* m, integer_t const* n,
+ integer_t const* p, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* c, float* d, float* x, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGGLSE( integer_t const* m, integer_t const* n,
+ integer_t const* p, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, double* c, double* d, double* x, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CGGLSE( integer_t const* m, integer_t const* n,
+ integer_t const* p, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, fcomplex_t* c, fcomplex_t* d,
+ fcomplex_t* x, fcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_ZGGLSE( integer_t const* m, integer_t const* n,
+ integer_t const* p, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, dcomplex_t* c, dcomplex_t* d,
+ dcomplex_t* x, dcomplex_t* work, integer_t const* lwork,
+ integer_t* info );
+
+// Value-type variants of cgesv
+void LAPACK_ZCGESV( integer_t const* n, integer_t const* nrhs, dcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, dcomplex_t const* b,
+ integer_t const* ldb, dcomplex_t* x, integer_t const* ldx,
+ dcomplex_t* work, fcomplex_t* swork, integer_t* iter,
+ integer_t* info );
+
+// Value-type variants of gbsv
+void LAPACK_SGBSV( integer_t const* n, integer_t const* kl,
+ integer_t const* ku, integer_t const* nrhs, float* ab,
+ integer_t const* ldab, integer_t* ipiv, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DGBSV( integer_t const* n, integer_t const* kl,
+ integer_t const* ku, integer_t const* nrhs, double* ab,
+ integer_t const* ldab, integer_t* ipiv, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CGBSV( integer_t const* n, integer_t const* kl,
+ integer_t const* ku, integer_t const* nrhs, fcomplex_t* ab,
+ integer_t const* ldab, integer_t* ipiv, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZGBSV( integer_t const* n, integer_t const* kl,
+ integer_t const* ku, integer_t const* nrhs, dcomplex_t* ab,
+ integer_t const* ldab, integer_t* ipiv, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of gbsvx
+void LAPACK_SGBSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ float* ab, integer_t const* ldab, float* afb, integer_t const* ldafb,
+ integer_t* ipiv, char* equed, float* r, float* c, float* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* rcond,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DGBSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ double* ab, integer_t const* ldab, double* afb,
+ integer_t const* ldafb, integer_t* ipiv, char* equed, double* r,
+ double* c, double* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CGBSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ fcomplex_t* ab, integer_t const* ldab, fcomplex_t* afb,
+ integer_t const* ldafb, integer_t* ipiv, char* equed, float* r,
+ float* c, fcomplex_t* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZGBSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* kl, integer_t const* ku, integer_t const* nrhs,
+ dcomplex_t* ab, integer_t const* ldab, dcomplex_t* afb,
+ integer_t const* ldafb, integer_t* ipiv, char* equed, double* r,
+ double* c, dcomplex_t* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of gesv
+void LAPACK_SGESV( integer_t const* n, integer_t const* nrhs, float* a,
+ integer_t const* lda, integer_t* ipiv, float* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_DGESV( integer_t const* n, integer_t const* nrhs, double* a,
+ integer_t const* lda, integer_t* ipiv, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CGESV( integer_t const* n, integer_t const* nrhs, fcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZGESV( integer_t const* n, integer_t const* nrhs, dcomplex_t* a,
+ integer_t const* lda, integer_t* ipiv, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of gesvx
+void LAPACK_SGESVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda, float* af,
+ integer_t const* ldaf, integer_t* ipiv, char* equed, float* r,
+ float* c, float* b, integer_t const* ldb, float* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DGESVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda, double* af,
+ integer_t const* ldaf, integer_t* ipiv, char* equed, double* r,
+ double* c, double* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CGESVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* af, integer_t const* ldaf, integer_t* ipiv, char* equed,
+ float* r, float* c, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* rcond, float* ferr,
+ float* berr, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZGESVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* af, integer_t const* ldaf, integer_t* ipiv, char* equed,
+ double* r, double* c, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* rcond, double* ferr,
+ double* berr, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of gtsv
+void LAPACK_SGTSV( integer_t const* n, integer_t const* nrhs, float* dl,
+ float* d, float* du, float* b, integer_t const* ldb, integer_t* info );
+void LAPACK_DGTSV( integer_t const* n, integer_t const* nrhs, double* dl,
+ double* d, double* du, double* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_CGTSV( integer_t const* n, integer_t const* nrhs, fcomplex_t* dl,
+ fcomplex_t* d, fcomplex_t* du, fcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_ZGTSV( integer_t const* n, integer_t const* nrhs, dcomplex_t* dl,
+ dcomplex_t* d, dcomplex_t* du, dcomplex_t* b, integer_t const* ldb,
+ integer_t* info );
+
+// Value-type variants of gtsvx
+void LAPACK_SGTSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, float const* dl, float const* d,
+ float const* du, float* dlf, float* df, float* duf, float* du2,
+ integer_t* ipiv, float const* b, integer_t const* ldb, float* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DGTSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, double const* dl, double const* d,
+ double const* du, double* dlf, double* df, double* duf, double* du2,
+ integer_t* ipiv, double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CGTSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* dl, fcomplex_t const* d,
+ fcomplex_t const* du, fcomplex_t* dlf, fcomplex_t* df,
+ fcomplex_t* duf, fcomplex_t* du2, integer_t* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZGTSVX( char const* fact, char const* trans, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* dl, dcomplex_t const* d,
+ dcomplex_t const* du, dcomplex_t* dlf, dcomplex_t* df,
+ dcomplex_t* duf, dcomplex_t* du2, integer_t* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of hesv
+void LAPACK_CHESV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ integer_t* ipiv, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* work, integer_t const* lwork, integer_t* info );
+void LAPACK_ZHESV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ integer_t* ipiv, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* work, integer_t const* lwork, integer_t* info );
+
+// Value-type variants of hesvx
+void LAPACK_CHESVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* af, integer_t const* ldaf, integer_t* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* info );
+void LAPACK_ZHESVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* af, integer_t const* ldaf, integer_t* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* info );
+
+// Value-type variants of hpsv
+void LAPACK_CHPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* ap, integer_t* ipiv, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZHPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* ap, integer_t* ipiv, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of hpsvx
+void LAPACK_CHPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, fcomplex_t* afp,
+ integer_t* ipiv, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* rcond, float* ferr,
+ float* berr, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZHPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, dcomplex_t* afp,
+ integer_t* ipiv, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* rcond, double* ferr,
+ double* berr, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of pbsv
+void LAPACK_SPBSV( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, float* ab, integer_t const* ldab, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DPBSV( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, double* ab, integer_t const* ldab, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CPBSV( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, fcomplex_t* ab, integer_t const* ldab,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZPBSV( char const* uplo, integer_t const* n, integer_t const* kd,
+ integer_t const* nrhs, dcomplex_t* ab, integer_t const* ldab,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of pbsvx
+void LAPACK_SPBSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* kd, integer_t const* nrhs, float* ab,
+ integer_t const* ldab, float* afb, integer_t const* ldafb,
+ char* equed, float* s, float* b, integer_t const* ldb, float* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DPBSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* kd, integer_t const* nrhs, double* ab,
+ integer_t const* ldab, double* afb, integer_t const* ldafb,
+ char* equed, double* s, double* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CPBSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* kd, integer_t const* nrhs, fcomplex_t* ab,
+ integer_t const* ldab, fcomplex_t* afb, integer_t const* ldafb,
+ char* equed, float* s, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* rcond, float* ferr,
+ float* berr, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZPBSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* kd, integer_t const* nrhs, dcomplex_t* ab,
+ integer_t const* ldab, dcomplex_t* afb, integer_t const* ldafb,
+ char* equed, double* s, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* rcond, double* ferr,
+ double* berr, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of posv
+void LAPACK_SPOSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DPOSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CPOSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZPOSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of posvx
+void LAPACK_SPOSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda, float* af,
+ integer_t const* ldaf, char* equed, float* s, float* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* rcond,
+ float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DPOSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda, double* af,
+ integer_t const* ldaf, char* equed, double* s, double* b,
+ integer_t const* ldb, double* x, integer_t const* ldx, double* rcond,
+ double* ferr, double* berr, double* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_CPOSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* af, integer_t const* ldaf, char* equed, float* s,
+ fcomplex_t* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZPOSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* af, integer_t const* ldaf, char* equed, double* s,
+ dcomplex_t* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of ppsv
+void LAPACK_SPPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float* ap, float* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_DPPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double* ap, double* b, integer_t const* ldb,
+ integer_t* info );
+void LAPACK_CPPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* ap, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZPPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* ap, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of ppsvx
+void LAPACK_SPPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float* ap, float* afp, char* equed, float* s,
+ float* b, integer_t const* ldb, float* x, integer_t const* ldx,
+ float* rcond, float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DPPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double* ap, double* afp, char* equed,
+ double* s, double* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CPPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* ap, fcomplex_t* afp, char* equed,
+ float* s, fcomplex_t* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZPPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* ap, dcomplex_t* afp, char* equed,
+ double* s, dcomplex_t* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of ptsv
+void LAPACK_SPTSV( integer_t const* n, integer_t const* nrhs, float* d,
+ float* e, float* b, integer_t const* ldb, integer_t* info );
+void LAPACK_DPTSV( integer_t const* n, integer_t const* nrhs, double* d,
+ double* e, double* b, integer_t const* ldb, integer_t* info );
+void LAPACK_CPTSV( integer_t const* n, integer_t const* nrhs, float* d,
+ fcomplex_t* e, fcomplex_t* b, integer_t const* ldb, integer_t* info );
+void LAPACK_ZPTSV( integer_t const* n, integer_t const* nrhs, double* d,
+ dcomplex_t* e, dcomplex_t* b, integer_t const* ldb, integer_t* info );
+
+// Value-type variants of ptsvx
+void LAPACK_SPTSVX( char const* fact, integer_t const* n,
+ integer_t const* nrhs, float const* d, float const* e, float* df,
+ float* ef, float const* b, integer_t const* ldb, float* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ float* work, integer_t* info );
+void LAPACK_DPTSVX( char const* fact, integer_t const* n,
+ integer_t const* nrhs, double const* d, double const* e, double* df,
+ double* ef, double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* info );
+void LAPACK_CPTSVX( char const* fact, integer_t const* n,
+ integer_t const* nrhs, float const* d, fcomplex_t const* e, float* df,
+ fcomplex_t* ef, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* rcond, float* ferr,
+ float* berr, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZPTSVX( char const* fact, integer_t const* n,
+ integer_t const* nrhs, double const* d, dcomplex_t const* e,
+ double* df, dcomplex_t* ef, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* rcond, double* ferr,
+ double* berr, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of sgesv
+void LAPACK_DSGESV( integer_t const* n, integer_t const* nrhs, double* a,
+ integer_t const* lda, integer_t* ipiv, double const* b,
+ integer_t const* ldb, double* x, integer_t const* ldx, double* work,
+ float* swork, integer_t* iter, integer_t* info );
+
+// Value-type variants of spsv
+void LAPACK_SSPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float* ap, integer_t* ipiv, float* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_DSPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double* ap, integer_t* ipiv, double* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_CSPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* ap, integer_t* ipiv, fcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+void LAPACK_ZSPSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* ap, integer_t* ipiv, dcomplex_t* b,
+ integer_t const* ldb, integer_t* info );
+
+// Value-type variants of spsvx
+void LAPACK_SSPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* ap, float* afp, integer_t* ipiv,
+ float const* b, integer_t const* ldb, float* x, integer_t const* ldx,
+ float* rcond, float* ferr, float* berr, float* work, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DSPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* ap, double* afp, integer_t* ipiv,
+ double const* b, integer_t const* ldb, double* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CSPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* ap, fcomplex_t* afp,
+ integer_t* ipiv, fcomplex_t const* b, integer_t const* ldb,
+ fcomplex_t* x, integer_t const* ldx, float* rcond, float* ferr,
+ float* berr, fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZSPSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* ap, dcomplex_t* afp,
+ integer_t* ipiv, dcomplex_t const* b, integer_t const* ldb,
+ dcomplex_t* x, integer_t const* ldx, double* rcond, double* ferr,
+ double* berr, dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of sysv
+void LAPACK_SSYSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda,
+ integer_t* ipiv, float* b, integer_t const* ldb, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DSYSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda,
+ integer_t* ipiv, double* b, integer_t const* ldb, double* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_CSYSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ integer_t* ipiv, fcomplex_t* b, integer_t const* ldb,
+ fcomplex_t* work, integer_t const* lwork, integer_t* info );
+void LAPACK_ZSYSV( char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ integer_t* ipiv, dcomplex_t* b, integer_t const* ldb,
+ dcomplex_t* work, integer_t const* lwork, integer_t* info );
+
+// Value-type variants of sysvx
+void LAPACK_SSYSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda,
+ float* af, integer_t const* ldaf, integer_t* ipiv, float const* b,
+ integer_t const* ldb, float* x, integer_t const* ldx, float* rcond,
+ float* ferr, float* berr, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_DSYSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ double* af, integer_t const* ldaf, integer_t* ipiv, double const* b,
+ integer_t const* ldb, double* x, integer_t const* ldx, double* rcond,
+ double* ferr, double* berr, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CSYSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t const* a, integer_t const* lda,
+ fcomplex_t* af, integer_t const* ldaf, integer_t* ipiv,
+ fcomplex_t const* b, integer_t const* ldb, fcomplex_t* x,
+ integer_t const* ldx, float* rcond, float* ferr, float* berr,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* info );
+void LAPACK_ZSYSVX( char const* fact, char const* uplo, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* af, integer_t const* ldaf, integer_t* ipiv,
+ dcomplex_t const* b, integer_t const* ldb, dcomplex_t* x,
+ integer_t const* ldx, double* rcond, double* ferr, double* berr,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* info );
+
+// Value-type variants of gees
+void LAPACK_SGEES( char const* jobvs, char const* sort, logical_t* select,
+ integer_t const* n, float* a, integer_t const* lda, integer_t* sdim,
+ float* wr, float* wi, float* vs, integer_t const* ldvs, float* work,
+ integer_t const* lwork, logical_t* bwork, integer_t* info );
+void LAPACK_DGEES( char const* jobvs, char const* sort, logical_t* select,
+ integer_t const* n, double* a, integer_t const* lda, integer_t* sdim,
+ double* wr, double* wi, double* vs, integer_t const* ldvs,
+ double* work, integer_t const* lwork, logical_t* bwork,
+ integer_t* info );
+void LAPACK_CGEES( char const* jobvs, char const* sort, logical_t* select,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ integer_t* sdim, fcomplex_t* w, fcomplex_t* vs, integer_t const* ldvs,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ logical_t* bwork, integer_t* info );
+void LAPACK_ZGEES( char const* jobvs, char const* sort, logical_t* select,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ integer_t* sdim, dcomplex_t* w, dcomplex_t* vs, integer_t const* ldvs,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ logical_t* bwork, integer_t* info );
+
+// Value-type variants of geesx
+void LAPACK_SGEESX( char const* jobvs, char const* sort, logical_t* select,
+ char const* sense, integer_t const* n, float* a, integer_t const* lda,
+ integer_t* sdim, float* wr, float* wi, float* vs,
+ integer_t const* ldvs, float* rconde, float* rcondv, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ logical_t* bwork, integer_t* info );
+void LAPACK_DGEESX( char const* jobvs, char const* sort, logical_t* select,
+ char const* sense, integer_t const* n, double* a,
+ integer_t const* lda, integer_t* sdim, double* wr, double* wi,
+ double* vs, integer_t const* ldvs, double* rconde, double* rcondv,
+ double* work, integer_t const* lwork, integer_t* iwork,
+ integer_t const* liwork, logical_t* bwork, integer_t* info );
+void LAPACK_CGEESX( char const* jobvs, char const* sort, logical_t* select,
+ char const* sense, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, integer_t* sdim, fcomplex_t* w, fcomplex_t* vs,
+ integer_t const* ldvs, float* rconde, float* rcondv, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, logical_t* bwork,
+ integer_t* info );
+void LAPACK_ZGEESX( char const* jobvs, char const* sort, logical_t* select,
+ char const* sense, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, integer_t* sdim, dcomplex_t* w, dcomplex_t* vs,
+ integer_t const* ldvs, double* rconde, double* rcondv,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ logical_t* bwork, integer_t* info );
+
+// Value-type variants of geev
+void LAPACK_SGEEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ float* a, integer_t const* lda, float* wr, float* wi, float* vl,
+ integer_t const* ldvl, float* vr, integer_t const* ldvr, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DGEEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ double* a, integer_t const* lda, double* wr, double* wi, double* vl,
+ integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGEEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, fcomplex_t* w, fcomplex_t* vl,
+ integer_t const* ldvl, fcomplex_t* vr, integer_t const* ldvr,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* info );
+void LAPACK_ZGEEV( char const* jobvl, char const* jobvr, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, dcomplex_t* w, dcomplex_t* vl,
+ integer_t const* ldvl, dcomplex_t* vr, integer_t const* ldvr,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* info );
+
+// Value-type variants of geevx
+void LAPACK_SGEEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, float* a, integer_t const* lda,
+ float* wr, float* wi, float* vl, integer_t const* ldvl, float* vr,
+ integer_t const* ldvr, integer_t* ilo, integer_t* ihi, float* scale,
+ float* abnrm, float* rconde, float* rcondv, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t* info );
+void LAPACK_DGEEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, double* a,
+ integer_t const* lda, double* wr, double* wi, double* vl,
+ integer_t const* ldvl, double* vr, integer_t const* ldvr,
+ integer_t* ilo, integer_t* ihi, double* scale, double* abnrm,
+ double* rconde, double* rcondv, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CGEEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, fcomplex_t* a,
+ integer_t const* lda, fcomplex_t* w, fcomplex_t* vl,
+ integer_t const* ldvl, fcomplex_t* vr, integer_t const* ldvr,
+ integer_t* ilo, integer_t* ihi, float* scale, float* abnrm,
+ float* rconde, float* rcondv, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t* info );
+void LAPACK_ZGEEVX( char const* balanc, char const* jobvl, char const* jobvr,
+ char const* sense, integer_t const* n, dcomplex_t* a,
+ integer_t const* lda, dcomplex_t* w, dcomplex_t* vl,
+ integer_t const* ldvl, dcomplex_t* vr, integer_t const* ldvr,
+ integer_t* ilo, integer_t* ihi, double* scale, double* abnrm,
+ double* rconde, double* rcondv, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t* info );
+
+// Value-type variants of gesdd
+void LAPACK_SGESDD( char const* jobz, integer_t const* m, integer_t const* n,
+ float* a, integer_t const* lda, float* s, float* u,
+ integer_t const* ldu, float* vt, integer_t const* ldvt, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t* info );
+void LAPACK_DGESDD( char const* jobz, integer_t const* m, integer_t const* n,
+ double* a, integer_t const* lda, double* s, double* u,
+ integer_t const* ldu, double* vt, integer_t const* ldvt, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t* info );
+void LAPACK_CGESDD( char const* jobz, integer_t const* m, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, float* s, fcomplex_t* u,
+ integer_t const* ldu, fcomplex_t* vt, integer_t const* ldvt,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_ZGESDD( char const* jobz, integer_t const* m, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, double* s, dcomplex_t* u,
+ integer_t const* ldu, dcomplex_t* vt, integer_t const* ldvt,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t* iwork, integer_t* info );
+
+// Value-type variants of gesvd
+void LAPACK_SGESVD( char const* jobu, char const* jobvt, integer_t const* m,
+ integer_t const* n, float* a, integer_t const* lda, float* s,
+ float* u, integer_t const* ldu, float* vt, integer_t const* ldvt,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DGESVD( char const* jobu, char const* jobvt, integer_t const* m,
+ integer_t const* n, double* a, integer_t const* lda, double* s,
+ double* u, integer_t const* ldu, double* vt, integer_t const* ldvt,
+ double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGESVD( char const* jobu, char const* jobvt, integer_t const* m,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda, float* s,
+ fcomplex_t* u, integer_t const* ldu, fcomplex_t* vt,
+ integer_t const* ldvt, fcomplex_t* work, integer_t const* lwork,
+ float* rwork, integer_t* info );
+void LAPACK_ZGESVD( char const* jobu, char const* jobvt, integer_t const* m,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda, double* s,
+ dcomplex_t* u, integer_t const* ldu, dcomplex_t* vt,
+ integer_t const* ldvt, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* info );
+
+// Value-type variants of hbev
+void LAPACK_CHBEV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, fcomplex_t* ab, integer_t const* ldab, float* w,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work, float* rwork,
+ integer_t* info );
+void LAPACK_ZHBEV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, dcomplex_t* ab, integer_t const* ldab, double* w,
+ dcomplex_t* z, integer_t const* ldz, dcomplex_t* work, double* rwork,
+ integer_t* info );
+
+// Value-type variants of hbevd
+void LAPACK_CHBEVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, fcomplex_t* ab, integer_t const* ldab, float* w,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_ZHBEVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, dcomplex_t* ab, integer_t const* ldab, double* w,
+ dcomplex_t* z, integer_t const* ldz, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of hbevx
+void LAPACK_CHBEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* kd, fcomplex_t* ab,
+ integer_t const* ldab, fcomplex_t* q, integer_t const* ldq,
+ float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, integer_t* m, float* w,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work, float* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_ZHBEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* kd, dcomplex_t* ab,
+ integer_t const* ldab, dcomplex_t* q, integer_t const* ldq,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ dcomplex_t* z, integer_t const* ldz, dcomplex_t* work, double* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of heev
+void LAPACK_CHEEV( char const* jobz, char const* uplo, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, float* w, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t* info );
+void LAPACK_ZHEEV( char const* jobz, char const* uplo, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, double* w, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t* info );
+
+// Value-type variants of heevd
+void LAPACK_CHEEVD( char const* jobz, char const* uplo, integer_t const* n,
+ fcomplex_t* a, integer_t const* lda, float* w, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_ZHEEVD( char const* jobz, char const* uplo, integer_t const* n,
+ dcomplex_t* a, integer_t const* lda, double* w, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t const* lrwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of heevr
+void LAPACK_CHEEVR( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, integer_t* m, float* w,
+ fcomplex_t* z, integer_t const* ldz, integer_t* isuppz,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t const* lrwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_ZHEEVR( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ dcomplex_t* z, integer_t const* ldz, integer_t* isuppz,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t const* lrwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of heevx
+void LAPACK_CHEEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, fcomplex_t* a, integer_t const* lda,
+ float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, integer_t* m, float* w,
+ fcomplex_t* z, integer_t const* ldz, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t* info );
+void LAPACK_ZHEEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, dcomplex_t* a, integer_t const* lda,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ dcomplex_t* z, integer_t const* ldz, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t* iwork,
+ integer_t* ifail, integer_t* info );
+
+// Value-type variants of hpev
+void LAPACK_CHPEV( char const* jobz, char const* uplo, integer_t const* n,
+ fcomplex_t* ap, float* w, fcomplex_t* z, integer_t const* ldz,
+ fcomplex_t* work, float* rwork, integer_t* info );
+void LAPACK_ZHPEV( char const* jobz, char const* uplo, integer_t const* n,
+ dcomplex_t* ap, double* w, dcomplex_t* z, integer_t const* ldz,
+ dcomplex_t* work, double* rwork, integer_t* info );
+
+// Value-type variants of hpevd
+void LAPACK_CHPEVD( char const* jobz, char const* uplo, integer_t const* n,
+ fcomplex_t* ap, float* w, fcomplex_t* z, integer_t const* ldz,
+ fcomplex_t* work, integer_t const* lwork, float* rwork,
+ integer_t const* lrwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_ZHPEVD( char const* jobz, char const* uplo, integer_t const* n,
+ dcomplex_t* ap, double* w, dcomplex_t* z, integer_t const* ldz,
+ dcomplex_t* work, integer_t const* lwork, double* rwork,
+ integer_t const* lrwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of hpevx
+void LAPACK_CHPEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, fcomplex_t* ap, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, fcomplex_t* z, integer_t const* ldz,
+ fcomplex_t* work, float* rwork, integer_t* iwork, integer_t* ifail,
+ integer_t* info );
+void LAPACK_ZHPEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, dcomplex_t* ap, double const* vl,
+ double const* vu, integer_t const* il, integer_t const* iu,
+ double const* abstol, integer_t* m, double* w, dcomplex_t* z,
+ integer_t const* ldz, dcomplex_t* work, double* rwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of sbev
+void LAPACK_SSBEV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, float* ab, integer_t const* ldab, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_DSBEV( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, double* ab, integer_t const* ldab, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t* info );
+
+// Value-type variants of sbevd
+void LAPACK_SSBEVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, float* ab, integer_t const* ldab, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSBEVD( char const* jobz, char const* uplo, integer_t const* n,
+ integer_t const* kd, double* ab, integer_t const* ldab, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of sbevx
+void LAPACK_SSBEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* kd, float* ab,
+ integer_t const* ldab, float* q, integer_t const* ldq,
+ float const* vl, float const* vu, integer_t const* il,
+ integer_t const* iu, float const* abstol, integer_t* m, float* w,
+ float* z, integer_t const* ldz, float* work, integer_t* iwork,
+ integer_t* ifail, integer_t* info );
+void LAPACK_DSBEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, integer_t const* kd, double* ab,
+ integer_t const* ldab, double* q, integer_t const* ldq,
+ double const* vl, double const* vu, integer_t const* il,
+ integer_t const* iu, double const* abstol, integer_t* m, double* w,
+ double* z, integer_t const* ldz, double* work, integer_t* iwork,
+ integer_t* ifail, integer_t* info );
+
+// Value-type variants of spev
+void LAPACK_SSPEV( char const* jobz, char const* uplo, integer_t const* n,
+ float* ap, float* w, float* z, integer_t const* ldz, float* work,
+ integer_t* info );
+void LAPACK_DSPEV( char const* jobz, char const* uplo, integer_t const* n,
+ double* ap, double* w, double* z, integer_t const* ldz, double* work,
+ integer_t* info );
+
+// Value-type variants of spevd
+void LAPACK_SSPEVD( char const* jobz, char const* uplo, integer_t const* n,
+ float* ap, float* w, float* z, integer_t const* ldz, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_DSPEVD( char const* jobz, char const* uplo, integer_t const* n,
+ double* ap, double* w, double* z, integer_t const* ldz, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of spevx
+void LAPACK_SSPEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, float* ap, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, float* z, integer_t const* ldz, float* work,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_DSPEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, double* ap, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, double* z, integer_t const* ldz,
+ double* work, integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of stev
+void LAPACK_SSTEV( char const* jobz, integer_t const* n, float* d, float* e,
+ float* z, integer_t const* ldz, float* work, integer_t* info );
+void LAPACK_DSTEV( char const* jobz, integer_t const* n, double* d, double* e,
+ double* z, integer_t const* ldz, double* work, integer_t* info );
+
+// Value-type variants of stevd
+void LAPACK_SSTEVD( char const* jobz, integer_t const* n, float* d, float* e,
+ float* z, integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSTEVD( char const* jobz, integer_t const* n, double* d,
+ double* e, double* z, integer_t const* ldz, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of stevr
+void LAPACK_SSTEVR( char const* jobz, char const* range, integer_t const* n,
+ float* d, float* e, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, float* z, integer_t const* ldz,
+ integer_t* isuppz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+void LAPACK_DSTEVR( char const* jobz, char const* range, integer_t const* n,
+ double* d, double* e, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, double* z, integer_t const* ldz,
+ integer_t* isuppz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t const* liwork, integer_t* info );
+
+// Value-type variants of stevx
+void LAPACK_SSTEVX( char const* jobz, char const* range, integer_t const* n,
+ float* d, float* e, float const* vl, float const* vu,
+ integer_t const* il, integer_t const* iu, float const* abstol,
+ integer_t* m, float* w, float* z, integer_t const* ldz, float* work,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_DSTEVX( char const* jobz, char const* range, integer_t const* n,
+ double* d, double* e, double const* vl, double const* vu,
+ integer_t const* il, integer_t const* iu, double const* abstol,
+ integer_t* m, double* w, double* z, integer_t const* ldz,
+ double* work, integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of syev
+void LAPACK_SSYEV( char const* jobz, char const* uplo, integer_t const* n,
+ float* a, integer_t const* lda, float* w, float* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_DSYEV( char const* jobz, char const* uplo, integer_t const* n,
+ double* a, integer_t const* lda, double* w, double* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of syevd
+void LAPACK_SSYEVD( char const* jobz, char const* uplo, integer_t const* n,
+ float* a, integer_t const* lda, float* w, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_DSYEVD( char const* jobz, char const* uplo, integer_t const* n,
+ double* a, integer_t const* lda, double* w, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of syevr
+void LAPACK_SSYEVR( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, float* a, integer_t const* lda, float const* vl,
+ float const* vu, integer_t const* il, integer_t const* iu,
+ float const* abstol, integer_t* m, float* w, float* z,
+ integer_t const* ldz, integer_t* isuppz, float* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+void LAPACK_DSYEVR( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, double* a, integer_t const* lda, double const* vl,
+ double const* vu, integer_t const* il, integer_t const* iu,
+ double const* abstol, integer_t* m, double* w, double* z,
+ integer_t const* ldz, integer_t* isuppz, double* work,
+ integer_t const* lwork, integer_t* iwork, integer_t const* liwork,
+ integer_t* info );
+
+// Value-type variants of syevx
+void LAPACK_SSYEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, float* a, integer_t const* lda, float const* vl,
+ float const* vu, integer_t const* il, integer_t const* iu,
+ float const* abstol, integer_t* m, float* w, float* z,
+ integer_t const* ldz, float* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+void LAPACK_DSYEVX( char const* jobz, char const* range, char const* uplo,
+ integer_t const* n, double* a, integer_t const* lda, double const* vl,
+ double const* vu, integer_t const* il, integer_t const* iu,
+ double const* abstol, integer_t* m, double* w, double* z,
+ integer_t const* ldz, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* ifail, integer_t* info );
+
+// Value-type variants of gels
+void LAPACK_SGELS( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGELS( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, double* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_CGELS( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, fcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+void LAPACK_ZGELS( char const* trans, integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, dcomplex_t* work,
+ integer_t const* lwork, integer_t* info );
+
+// Value-type variants of gelsd
+void LAPACK_SGELSD( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, float const* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* s, float const* rcond, integer_t* rank,
+ float* work, integer_t const* lwork, integer_t* iwork,
+ integer_t* info );
+void LAPACK_DGELSD( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, double const* a, integer_t const* lda,
+ double* b, integer_t const* ldb, double* s, double const* rcond,
+ integer_t* rank, double* work, integer_t const* lwork,
+ integer_t* iwork, integer_t* info );
+void LAPACK_CGELSD( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, float* s, float const* rcond,
+ integer_t* rank, fcomplex_t* work, integer_t const* lwork,
+ float* rwork, integer_t* iwork, integer_t* info );
+void LAPACK_ZGELSD( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t const* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, double* s, double const* rcond,
+ integer_t* rank, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* iwork, integer_t* info );
+
+// Value-type variants of gelss
+void LAPACK_SGELSS( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, float* s, float const* rcond, integer_t* rank,
+ float* work, integer_t const* lwork, integer_t* info );
+void LAPACK_DGELSS( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, double* s, double const* rcond, integer_t* rank,
+ double* work, integer_t const* lwork, integer_t* info );
+void LAPACK_CGELSS( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, float* s, float const* rcond,
+ integer_t* rank, fcomplex_t* work, integer_t const* lwork,
+ float* rwork, integer_t* info );
+void LAPACK_ZGELSS( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, double* s, double const* rcond,
+ integer_t* rank, dcomplex_t* work, integer_t const* lwork,
+ double* rwork, integer_t* info );
+
+// Value-type variants of gelsy
+void LAPACK_SGELSY( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, float* a, integer_t const* lda, float* b,
+ integer_t const* ldb, integer_t* jpvt, float const* rcond,
+ integer_t* rank, float* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_DGELSY( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, double* a, integer_t const* lda, double* b,
+ integer_t const* ldb, integer_t* jpvt, double const* rcond,
+ integer_t* rank, double* work, integer_t const* lwork,
+ integer_t* info );
+void LAPACK_CGELSY( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, fcomplex_t* a, integer_t const* lda,
+ fcomplex_t* b, integer_t const* ldb, integer_t* jpvt,
+ float const* rcond, integer_t* rank, fcomplex_t* work,
+ integer_t const* lwork, float* rwork, integer_t* info );
+void LAPACK_ZGELSY( integer_t const* m, integer_t const* n,
+ integer_t const* nrhs, dcomplex_t* a, integer_t const* lda,
+ dcomplex_t* b, integer_t const* ldb, integer_t* jpvt,
+ double const* rcond, integer_t* rank, dcomplex_t* work,
+ integer_t const* lwork, double* rwork, integer_t* info );
+
+// Value-type variants of lalsd
+void LAPACK_SLALSD( char const* uplo, integer_t const* smlsiz,
+ integer_t const* n, integer_t const* nrhs, float* d, float* e,
+ float* b, integer_t const* ldb, float const* rcond, integer_t* rank,
+ float* work, integer_t* iwork, integer_t* info );
+void LAPACK_DLALSD( char const* uplo, integer_t const* smlsiz,
+ integer_t const* n, integer_t const* nrhs, double* d, double* e,
+ double* b, integer_t const* ldb, double const* rcond, integer_t* rank,
+ double* work, integer_t* iwork, integer_t* info );
+void LAPACK_CLALSD( char const* uplo, integer_t const* smlsiz,
+ integer_t const* n, integer_t const* nrhs, float* d, float* e,
+ fcomplex_t* b, integer_t const* ldb, float const* rcond,
+ integer_t* rank, fcomplex_t* work, float* rwork, integer_t* iwork,
+ integer_t* info );
+void LAPACK_ZLALSD( char const* uplo, integer_t const* smlsiz,
+ integer_t const* n, integer_t const* nrhs, double* d, double* e,
+ dcomplex_t* b, integer_t const* ldb, double const* rcond,
+ integer_t* rank, dcomplex_t* work, double* rwork, integer_t* iwork,
+ integer_t* info );
+
+//
+// LAPACK auxiliary routines
+//
+
+int LAPACK_ILAENV(int const* ispec, const char* name, const char* opt,
+ int const* n1, int const* n2, int const* n3, int const* n4, int, int);
+
+}
+
+#endif
+

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/lapack_names.h
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/lapack_names.h 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,1192 @@
+//
+// Copyright (c) 2003--2009
+// Toon Knapen, Karl Meerbergen, Kresimir Fresl,
+// Thomas Klimpel and Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_LAPACK_NAMES_H
+#define BOOST_NUMERIC_BINDINGS_LAPACK_LAPACK_NAMES_H
+
+#ifndef BOOST_NUMERIC_BINDINGS_USE_CLAPACK
+# include <boost/numeric/bindings/traits/fortran.h>
+#else
+# define FORTRAN_ID( id ) id##_
+#endif
+
+//
+// LAPACK computational routines
+//
+
+// Value-type variants of hbgst
+#define LAPACK_CHBGST FORTRAN_ID( chbgst )
+#define LAPACK_ZHBGST FORTRAN_ID( zhbgst )
+
+// Value-type variants of hegst
+#define LAPACK_CHEGST FORTRAN_ID( chegst )
+#define LAPACK_ZHEGST FORTRAN_ID( zhegst )
+
+// Value-type variants of pbstf
+#define LAPACK_SPBSTF FORTRAN_ID( spbstf )
+#define LAPACK_DPBSTF FORTRAN_ID( dpbstf )
+#define LAPACK_CPBSTF FORTRAN_ID( cpbstf )
+#define LAPACK_ZPBSTF FORTRAN_ID( zpbstf )
+
+// Value-type variants of sbgst
+#define LAPACK_SSBGST FORTRAN_ID( ssbgst )
+#define LAPACK_DSBGST FORTRAN_ID( dsbgst )
+
+// Value-type variants of sygst
+#define LAPACK_SSYGST FORTRAN_ID( ssygst )
+#define LAPACK_DSYGST FORTRAN_ID( dsygst )
+
+// Value-type variants of ggqrf
+#define LAPACK_SGGQRF FORTRAN_ID( sggqrf )
+#define LAPACK_DGGQRF FORTRAN_ID( dggqrf )
+#define LAPACK_CGGQRF FORTRAN_ID( cggqrf )
+#define LAPACK_ZGGQRF FORTRAN_ID( zggqrf )
+
+// Value-type variants of ggrqf
+#define LAPACK_SGGRQF FORTRAN_ID( sggrqf )
+#define LAPACK_DGGRQF FORTRAN_ID( dggrqf )
+#define LAPACK_CGGRQF FORTRAN_ID( cggrqf )
+#define LAPACK_ZGGRQF FORTRAN_ID( zggrqf )
+
+// Value-type variants of gelqf
+#define LAPACK_SGELQF FORTRAN_ID( sgelqf )
+#define LAPACK_DGELQF FORTRAN_ID( dgelqf )
+#define LAPACK_CGELQF FORTRAN_ID( cgelqf )
+#define LAPACK_ZGELQF FORTRAN_ID( zgelqf )
+
+// Value-type variants of geqlf
+#define LAPACK_SGEQLF FORTRAN_ID( sgeqlf )
+#define LAPACK_DGEQLF FORTRAN_ID( dgeqlf )
+#define LAPACK_CGEQLF FORTRAN_ID( cgeqlf )
+#define LAPACK_ZGEQLF FORTRAN_ID( zgeqlf )
+
+// Value-type variants of geqp3
+#define LAPACK_SGEQP3 FORTRAN_ID( sgeqp3 )
+#define LAPACK_DGEQP3 FORTRAN_ID( dgeqp3 )
+#define LAPACK_CGEQP3 FORTRAN_ID( cgeqp3 )
+#define LAPACK_ZGEQP3 FORTRAN_ID( zgeqp3 )
+
+// Value-type variants of geqrf
+#define LAPACK_SGEQRF FORTRAN_ID( sgeqrf )
+#define LAPACK_DGEQRF FORTRAN_ID( dgeqrf )
+#define LAPACK_CGEQRF FORTRAN_ID( cgeqrf )
+#define LAPACK_ZGEQRF FORTRAN_ID( zgeqrf )
+
+// Value-type variants of gerqf
+#define LAPACK_SGERQF FORTRAN_ID( sgerqf )
+#define LAPACK_DGERQF FORTRAN_ID( dgerqf )
+#define LAPACK_CGERQF FORTRAN_ID( cgerqf )
+#define LAPACK_ZGERQF FORTRAN_ID( zgerqf )
+
+// Value-type variants of larz
+#define LAPACK_SLARZ FORTRAN_ID( slarz )
+#define LAPACK_DLARZ FORTRAN_ID( dlarz )
+#define LAPACK_CLARZ FORTRAN_ID( clarz )
+#define LAPACK_ZLARZ FORTRAN_ID( zlarz )
+
+// Value-type variants of latrz
+#define LAPACK_SLATRZ FORTRAN_ID( slatrz )
+#define LAPACK_DLATRZ FORTRAN_ID( dlatrz )
+#define LAPACK_CLATRZ FORTRAN_ID( clatrz )
+#define LAPACK_ZLATRZ FORTRAN_ID( zlatrz )
+
+// Value-type variants of orglq
+#define LAPACK_SORGLQ FORTRAN_ID( sorglq )
+#define LAPACK_DORGLQ FORTRAN_ID( dorglq )
+
+// Value-type variants of orgql
+#define LAPACK_SORGQL FORTRAN_ID( sorgql )
+#define LAPACK_DORGQL FORTRAN_ID( dorgql )
+
+// Value-type variants of orgqr
+#define LAPACK_SORGQR FORTRAN_ID( sorgqr )
+#define LAPACK_DORGQR FORTRAN_ID( dorgqr )
+
+// Value-type variants of orgrq
+#define LAPACK_SORGRQ FORTRAN_ID( sorgrq )
+#define LAPACK_DORGRQ FORTRAN_ID( dorgrq )
+
+// Value-type variants of ormlq
+#define LAPACK_SORMLQ FORTRAN_ID( sormlq )
+#define LAPACK_DORMLQ FORTRAN_ID( dormlq )
+
+// Value-type variants of ormql
+#define LAPACK_SORMQL FORTRAN_ID( sormql )
+#define LAPACK_DORMQL FORTRAN_ID( dormql )
+
+// Value-type variants of ormqr
+#define LAPACK_SORMQR FORTRAN_ID( sormqr )
+#define LAPACK_DORMQR FORTRAN_ID( dormqr )
+
+// Value-type variants of ormrq
+#define LAPACK_SORMRQ FORTRAN_ID( sormrq )
+#define LAPACK_DORMRQ FORTRAN_ID( dormrq )
+
+// Value-type variants of ormrz
+#define LAPACK_SORMRZ FORTRAN_ID( sormrz )
+#define LAPACK_DORMRZ FORTRAN_ID( dormrz )
+
+// Value-type variants of tzrzf
+#define LAPACK_STZRZF FORTRAN_ID( stzrzf )
+#define LAPACK_DTZRZF FORTRAN_ID( dtzrzf )
+#define LAPACK_CTZRZF FORTRAN_ID( ctzrzf )
+#define LAPACK_ZTZRZF FORTRAN_ID( ztzrzf )
+
+// Value-type variants of unglq
+#define LAPACK_CUNGLQ FORTRAN_ID( cunglq )
+#define LAPACK_ZUNGLQ FORTRAN_ID( zunglq )
+
+// Value-type variants of ungql
+#define LAPACK_CUNGQL FORTRAN_ID( cungql )
+#define LAPACK_ZUNGQL FORTRAN_ID( zungql )
+
+// Value-type variants of ungqr
+#define LAPACK_CUNGQR FORTRAN_ID( cungqr )
+#define LAPACK_ZUNGQR FORTRAN_ID( zungqr )
+
+// Value-type variants of ungrq
+#define LAPACK_CUNGRQ FORTRAN_ID( cungrq )
+#define LAPACK_ZUNGRQ FORTRAN_ID( zungrq )
+
+// Value-type variants of unmlq
+#define LAPACK_CUNMLQ FORTRAN_ID( cunmlq )
+#define LAPACK_ZUNMLQ FORTRAN_ID( zunmlq )
+
+// Value-type variants of unmql
+#define LAPACK_CUNMQL FORTRAN_ID( cunmql )
+#define LAPACK_ZUNMQL FORTRAN_ID( zunmql )
+
+// Value-type variants of unmqr
+#define LAPACK_CUNMQR FORTRAN_ID( cunmqr )
+#define LAPACK_ZUNMQR FORTRAN_ID( zunmqr )
+
+// Value-type variants of unmrq
+#define LAPACK_CUNMRQ FORTRAN_ID( cunmrq )
+#define LAPACK_ZUNMRQ FORTRAN_ID( zunmrq )
+
+// Value-type variants of unmrz
+#define LAPACK_CUNMRZ FORTRAN_ID( cunmrz )
+#define LAPACK_ZUNMRZ FORTRAN_ID( zunmrz )
+
+// Value-type variants of bdsdc
+#define LAPACK_SBDSDC FORTRAN_ID( sbdsdc )
+#define LAPACK_DBDSDC FORTRAN_ID( dbdsdc )
+
+// Value-type variants of bdsqr
+#define LAPACK_SBDSQR FORTRAN_ID( sbdsqr )
+#define LAPACK_DBDSQR FORTRAN_ID( dbdsqr )
+#define LAPACK_CBDSQR FORTRAN_ID( cbdsqr )
+#define LAPACK_ZBDSQR FORTRAN_ID( zbdsqr )
+
+// Value-type variants of gbbrd
+#define LAPACK_SGBBRD FORTRAN_ID( sgbbrd )
+#define LAPACK_DGBBRD FORTRAN_ID( dgbbrd )
+#define LAPACK_CGBBRD FORTRAN_ID( cgbbrd )
+#define LAPACK_ZGBBRD FORTRAN_ID( zgbbrd )
+
+// Value-type variants of gebrd
+#define LAPACK_SGEBRD FORTRAN_ID( sgebrd )
+#define LAPACK_DGEBRD FORTRAN_ID( dgebrd )
+#define LAPACK_CGEBRD FORTRAN_ID( cgebrd )
+#define LAPACK_ZGEBRD FORTRAN_ID( zgebrd )
+
+// Value-type variants of labrd
+#define LAPACK_SLABRD FORTRAN_ID( slabrd )
+#define LAPACK_DLABRD FORTRAN_ID( dlabrd )
+#define LAPACK_CLABRD FORTRAN_ID( clabrd )
+#define LAPACK_ZLABRD FORTRAN_ID( zlabrd )
+
+// Value-type variants of orgbr
+#define LAPACK_SORGBR FORTRAN_ID( sorgbr )
+#define LAPACK_DORGBR FORTRAN_ID( dorgbr )
+
+// Value-type variants of ormbr
+#define LAPACK_SORMBR FORTRAN_ID( sormbr )
+#define LAPACK_DORMBR FORTRAN_ID( dormbr )
+
+// Value-type variants of ungbr
+#define LAPACK_CUNGBR FORTRAN_ID( cungbr )
+#define LAPACK_ZUNGBR FORTRAN_ID( zungbr )
+
+// Value-type variants of unmbr
+#define LAPACK_CUNMBR FORTRAN_ID( cunmbr )
+#define LAPACK_ZUNMBR FORTRAN_ID( zunmbr )
+
+// Value-type variants of gebak
+#define LAPACK_SGEBAK FORTRAN_ID( sgebak )
+#define LAPACK_DGEBAK FORTRAN_ID( dgebak )
+#define LAPACK_CGEBAK FORTRAN_ID( cgebak )
+#define LAPACK_ZGEBAK FORTRAN_ID( zgebak )
+
+// Value-type variants of gebal
+#define LAPACK_SGEBAL FORTRAN_ID( sgebal )
+#define LAPACK_DGEBAL FORTRAN_ID( dgebal )
+#define LAPACK_CGEBAL FORTRAN_ID( cgebal )
+#define LAPACK_ZGEBAL FORTRAN_ID( zgebal )
+
+// Value-type variants of gehrd
+#define LAPACK_SGEHRD FORTRAN_ID( sgehrd )
+#define LAPACK_DGEHRD FORTRAN_ID( dgehrd )
+#define LAPACK_CGEHRD FORTRAN_ID( cgehrd )
+#define LAPACK_ZGEHRD FORTRAN_ID( zgehrd )
+
+// Value-type variants of hsein
+#define LAPACK_SHSEIN FORTRAN_ID( shsein )
+#define LAPACK_DHSEIN FORTRAN_ID( dhsein )
+#define LAPACK_CHSEIN FORTRAN_ID( chsein )
+#define LAPACK_ZHSEIN FORTRAN_ID( zhsein )
+
+// Value-type variants of hseqr
+#define LAPACK_SHSEQR FORTRAN_ID( shseqr )
+#define LAPACK_DHSEQR FORTRAN_ID( dhseqr )
+#define LAPACK_CHSEQR FORTRAN_ID( chseqr )
+#define LAPACK_ZHSEQR FORTRAN_ID( zhseqr )
+
+// Value-type variants of orghr
+#define LAPACK_SORGHR FORTRAN_ID( sorghr )
+#define LAPACK_DORGHR FORTRAN_ID( dorghr )
+
+// Value-type variants of ormhr
+#define LAPACK_SORMHR FORTRAN_ID( sormhr )
+#define LAPACK_DORMHR FORTRAN_ID( dormhr )
+
+// Value-type variants of trevc
+#define LAPACK_STREVC FORTRAN_ID( strevc )
+#define LAPACK_DTREVC FORTRAN_ID( dtrevc )
+#define LAPACK_CTREVC FORTRAN_ID( ctrevc )
+#define LAPACK_ZTREVC FORTRAN_ID( ztrevc )
+
+// Value-type variants of trexc
+#define LAPACK_STREXC FORTRAN_ID( strexc )
+#define LAPACK_DTREXC FORTRAN_ID( dtrexc )
+#define LAPACK_CTREXC FORTRAN_ID( ctrexc )
+#define LAPACK_ZTREXC FORTRAN_ID( ztrexc )
+
+// Value-type variants of trsen
+#define LAPACK_CTRSEN FORTRAN_ID( ctrsen )
+#define LAPACK_ZTRSEN FORTRAN_ID( ztrsen )
+
+// Value-type variants of trsna
+#define LAPACK_STRSNA FORTRAN_ID( strsna )
+#define LAPACK_DTRSNA FORTRAN_ID( dtrsna )
+#define LAPACK_CTRSNA FORTRAN_ID( ctrsna )
+#define LAPACK_ZTRSNA FORTRAN_ID( ztrsna )
+
+// Value-type variants of trsyl
+#define LAPACK_STRSYL FORTRAN_ID( strsyl )
+#define LAPACK_DTRSYL FORTRAN_ID( dtrsyl )
+#define LAPACK_CTRSYL FORTRAN_ID( ctrsyl )
+#define LAPACK_ZTRSYL FORTRAN_ID( ztrsyl )
+
+// Value-type variants of unghr
+#define LAPACK_CUNGHR FORTRAN_ID( cunghr )
+#define LAPACK_ZUNGHR FORTRAN_ID( zunghr )
+
+// Value-type variants of unmhr
+#define LAPACK_CUNMHR FORTRAN_ID( cunmhr )
+#define LAPACK_ZUNMHR FORTRAN_ID( zunmhr )
+
+// Value-type variants of gbcon
+#define LAPACK_SGBCON FORTRAN_ID( sgbcon )
+#define LAPACK_DGBCON FORTRAN_ID( dgbcon )
+#define LAPACK_CGBCON FORTRAN_ID( cgbcon )
+#define LAPACK_ZGBCON FORTRAN_ID( zgbcon )
+
+// Value-type variants of gbequ
+#define LAPACK_SGBEQU FORTRAN_ID( sgbequ )
+#define LAPACK_DGBEQU FORTRAN_ID( dgbequ )
+#define LAPACK_CGBEQU FORTRAN_ID( cgbequ )
+#define LAPACK_ZGBEQU FORTRAN_ID( zgbequ )
+
+// Value-type variants of gbrfs
+#define LAPACK_SGBRFS FORTRAN_ID( sgbrfs )
+#define LAPACK_DGBRFS FORTRAN_ID( dgbrfs )
+#define LAPACK_CGBRFS FORTRAN_ID( cgbrfs )
+#define LAPACK_ZGBRFS FORTRAN_ID( zgbrfs )
+
+// Value-type variants of gbtrf
+#define LAPACK_SGBTRF FORTRAN_ID( sgbtrf )
+#define LAPACK_DGBTRF FORTRAN_ID( dgbtrf )
+#define LAPACK_CGBTRF FORTRAN_ID( cgbtrf )
+#define LAPACK_ZGBTRF FORTRAN_ID( zgbtrf )
+
+// Value-type variants of gbtrs
+#define LAPACK_SGBTRS FORTRAN_ID( sgbtrs )
+#define LAPACK_DGBTRS FORTRAN_ID( dgbtrs )
+#define LAPACK_CGBTRS FORTRAN_ID( cgbtrs )
+#define LAPACK_ZGBTRS FORTRAN_ID( zgbtrs )
+
+// Value-type variants of gecon
+#define LAPACK_SGECON FORTRAN_ID( sgecon )
+#define LAPACK_DGECON FORTRAN_ID( dgecon )
+#define LAPACK_CGECON FORTRAN_ID( cgecon )
+#define LAPACK_ZGECON FORTRAN_ID( zgecon )
+
+// Value-type variants of geequ
+#define LAPACK_SGEEQU FORTRAN_ID( sgeequ )
+#define LAPACK_DGEEQU FORTRAN_ID( dgeequ )
+#define LAPACK_CGEEQU FORTRAN_ID( cgeequ )
+#define LAPACK_ZGEEQU FORTRAN_ID( zgeequ )
+
+// Value-type variants of gerfs
+#define LAPACK_SGERFS FORTRAN_ID( sgerfs )
+#define LAPACK_DGERFS FORTRAN_ID( dgerfs )
+#define LAPACK_CGERFS FORTRAN_ID( cgerfs )
+#define LAPACK_ZGERFS FORTRAN_ID( zgerfs )
+
+// Value-type variants of getrf
+#define LAPACK_SGETRF FORTRAN_ID( sgetrf )
+#define LAPACK_DGETRF FORTRAN_ID( dgetrf )
+#define LAPACK_CGETRF FORTRAN_ID( cgetrf )
+#define LAPACK_ZGETRF FORTRAN_ID( zgetrf )
+
+// Value-type variants of getri
+#define LAPACK_SGETRI FORTRAN_ID( sgetri )
+#define LAPACK_DGETRI FORTRAN_ID( dgetri )
+#define LAPACK_CGETRI FORTRAN_ID( cgetri )
+#define LAPACK_ZGETRI FORTRAN_ID( zgetri )
+
+// Value-type variants of getrs
+#define LAPACK_SGETRS FORTRAN_ID( sgetrs )
+#define LAPACK_DGETRS FORTRAN_ID( dgetrs )
+#define LAPACK_CGETRS FORTRAN_ID( cgetrs )
+#define LAPACK_ZGETRS FORTRAN_ID( zgetrs )
+
+// Value-type variants of gtrfs
+#define LAPACK_SGTRFS FORTRAN_ID( sgtrfs )
+#define LAPACK_DGTRFS FORTRAN_ID( dgtrfs )
+#define LAPACK_CGTRFS FORTRAN_ID( cgtrfs )
+#define LAPACK_ZGTRFS FORTRAN_ID( zgtrfs )
+
+// Value-type variants of gttrs
+#define LAPACK_SGTTRS FORTRAN_ID( sgttrs )
+#define LAPACK_DGTTRS FORTRAN_ID( dgttrs )
+#define LAPACK_CGTTRS FORTRAN_ID( cgttrs )
+#define LAPACK_ZGTTRS FORTRAN_ID( zgttrs )
+
+// Value-type variants of hecon
+#define LAPACK_CHECON FORTRAN_ID( checon )
+#define LAPACK_ZHECON FORTRAN_ID( zhecon )
+
+// Value-type variants of herfs
+#define LAPACK_CHERFS FORTRAN_ID( cherfs )
+#define LAPACK_ZHERFS FORTRAN_ID( zherfs )
+
+// Value-type variants of hetrf
+#define LAPACK_CHETRF FORTRAN_ID( chetrf )
+#define LAPACK_ZHETRF FORTRAN_ID( zhetrf )
+
+// Value-type variants of hetri
+#define LAPACK_CHETRI FORTRAN_ID( chetri )
+#define LAPACK_ZHETRI FORTRAN_ID( zhetri )
+
+// Value-type variants of hetrs
+#define LAPACK_CHETRS FORTRAN_ID( chetrs )
+#define LAPACK_ZHETRS FORTRAN_ID( zhetrs )
+
+// Value-type variants of hprfs
+#define LAPACK_CHPRFS FORTRAN_ID( chprfs )
+#define LAPACK_ZHPRFS FORTRAN_ID( zhprfs )
+
+// Value-type variants of hptrs
+#define LAPACK_CHPTRS FORTRAN_ID( chptrs )
+#define LAPACK_ZHPTRS FORTRAN_ID( zhptrs )
+
+// Value-type variants of lacon
+#define LAPACK_SLACON FORTRAN_ID( slacon )
+#define LAPACK_DLACON FORTRAN_ID( dlacon )
+#define LAPACK_CLACON FORTRAN_ID( clacon )
+#define LAPACK_ZLACON FORTRAN_ID( zlacon )
+
+// Value-type variants of latrs
+#define LAPACK_SLATRS FORTRAN_ID( slatrs )
+#define LAPACK_DLATRS FORTRAN_ID( dlatrs )
+#define LAPACK_CLATRS FORTRAN_ID( clatrs )
+#define LAPACK_ZLATRS FORTRAN_ID( zlatrs )
+
+// Value-type variants of pbcon
+#define LAPACK_SPBCON FORTRAN_ID( spbcon )
+#define LAPACK_DPBCON FORTRAN_ID( dpbcon )
+#define LAPACK_CPBCON FORTRAN_ID( cpbcon )
+#define LAPACK_ZPBCON FORTRAN_ID( zpbcon )
+
+// Value-type variants of pbequ
+#define LAPACK_SPBEQU FORTRAN_ID( spbequ )
+#define LAPACK_DPBEQU FORTRAN_ID( dpbequ )
+#define LAPACK_CPBEQU FORTRAN_ID( cpbequ )
+#define LAPACK_ZPBEQU FORTRAN_ID( zpbequ )
+
+// Value-type variants of pbrfs
+#define LAPACK_SPBRFS FORTRAN_ID( spbrfs )
+#define LAPACK_DPBRFS FORTRAN_ID( dpbrfs )
+#define LAPACK_CPBRFS FORTRAN_ID( cpbrfs )
+#define LAPACK_ZPBRFS FORTRAN_ID( zpbrfs )
+
+// Value-type variants of pbtrf
+#define LAPACK_SPBTRF FORTRAN_ID( spbtrf )
+#define LAPACK_DPBTRF FORTRAN_ID( dpbtrf )
+#define LAPACK_CPBTRF FORTRAN_ID( cpbtrf )
+#define LAPACK_ZPBTRF FORTRAN_ID( zpbtrf )
+
+// Value-type variants of pbtrs
+#define LAPACK_SPBTRS FORTRAN_ID( spbtrs )
+#define LAPACK_DPBTRS FORTRAN_ID( dpbtrs )
+#define LAPACK_CPBTRS FORTRAN_ID( cpbtrs )
+#define LAPACK_ZPBTRS FORTRAN_ID( zpbtrs )
+
+// Value-type variants of pocon
+#define LAPACK_SPOCON FORTRAN_ID( spocon )
+#define LAPACK_DPOCON FORTRAN_ID( dpocon )
+#define LAPACK_CPOCON FORTRAN_ID( cpocon )
+#define LAPACK_ZPOCON FORTRAN_ID( zpocon )
+
+// Value-type variants of poequ
+#define LAPACK_SPOEQU FORTRAN_ID( spoequ )
+#define LAPACK_DPOEQU FORTRAN_ID( dpoequ )
+#define LAPACK_CPOEQU FORTRAN_ID( cpoequ )
+#define LAPACK_ZPOEQU FORTRAN_ID( zpoequ )
+
+// Value-type variants of porfs
+#define LAPACK_SPORFS FORTRAN_ID( sporfs )
+#define LAPACK_DPORFS FORTRAN_ID( dporfs )
+#define LAPACK_CPORFS FORTRAN_ID( cporfs )
+#define LAPACK_ZPORFS FORTRAN_ID( zporfs )
+
+// Value-type variants of potrf
+#define LAPACK_SPOTRF FORTRAN_ID( spotrf )
+#define LAPACK_DPOTRF FORTRAN_ID( dpotrf )
+#define LAPACK_CPOTRF FORTRAN_ID( cpotrf )
+#define LAPACK_ZPOTRF FORTRAN_ID( zpotrf )
+
+// Value-type variants of potri
+#define LAPACK_SPOTRI FORTRAN_ID( spotri )
+#define LAPACK_DPOTRI FORTRAN_ID( dpotri )
+#define LAPACK_CPOTRI FORTRAN_ID( cpotri )
+#define LAPACK_ZPOTRI FORTRAN_ID( zpotri )
+
+// Value-type variants of potrs
+#define LAPACK_SPOTRS FORTRAN_ID( spotrs )
+#define LAPACK_DPOTRS FORTRAN_ID( dpotrs )
+#define LAPACK_CPOTRS FORTRAN_ID( cpotrs )
+#define LAPACK_ZPOTRS FORTRAN_ID( zpotrs )
+
+// Value-type variants of pprfs
+#define LAPACK_SPPRFS FORTRAN_ID( spprfs )
+#define LAPACK_DPPRFS FORTRAN_ID( dpprfs )
+#define LAPACK_CPPRFS FORTRAN_ID( cpprfs )
+#define LAPACK_ZPPRFS FORTRAN_ID( zpprfs )
+
+// Value-type variants of pptrs
+#define LAPACK_SPPTRS FORTRAN_ID( spptrs )
+#define LAPACK_DPPTRS FORTRAN_ID( dpptrs )
+#define LAPACK_CPPTRS FORTRAN_ID( cpptrs )
+#define LAPACK_ZPPTRS FORTRAN_ID( zpptrs )
+
+// Value-type variants of ptrfs
+#define LAPACK_SPTRFS FORTRAN_ID( sptrfs )
+#define LAPACK_DPTRFS FORTRAN_ID( dptrfs )
+#define LAPACK_CPTRFS FORTRAN_ID( cptrfs )
+#define LAPACK_ZPTRFS FORTRAN_ID( zptrfs )
+
+// Value-type variants of pttrs
+#define LAPACK_SPTTRS FORTRAN_ID( spttrs )
+#define LAPACK_DPTTRS FORTRAN_ID( dpttrs )
+#define LAPACK_CPTTRS FORTRAN_ID( cpttrs )
+#define LAPACK_ZPTTRS FORTRAN_ID( zpttrs )
+
+// Value-type variants of sprfs
+#define LAPACK_SSPRFS FORTRAN_ID( ssprfs )
+#define LAPACK_DSPRFS FORTRAN_ID( dsprfs )
+#define LAPACK_CSPRFS FORTRAN_ID( csprfs )
+#define LAPACK_ZSPRFS FORTRAN_ID( zsprfs )
+
+// Value-type variants of sptrs
+#define LAPACK_SSPTRS FORTRAN_ID( ssptrs )
+#define LAPACK_DSPTRS FORTRAN_ID( dsptrs )
+#define LAPACK_CSPTRS FORTRAN_ID( csptrs )
+#define LAPACK_ZSPTRS FORTRAN_ID( zsptrs )
+
+// Value-type variants of sycon
+#define LAPACK_SSYCON FORTRAN_ID( ssycon )
+#define LAPACK_DSYCON FORTRAN_ID( dsycon )
+#define LAPACK_CSYCON FORTRAN_ID( csycon )
+#define LAPACK_ZSYCON FORTRAN_ID( zsycon )
+
+// Value-type variants of syrfs
+#define LAPACK_SSYRFS FORTRAN_ID( ssyrfs )
+#define LAPACK_DSYRFS FORTRAN_ID( dsyrfs )
+#define LAPACK_CSYRFS FORTRAN_ID( csyrfs )
+#define LAPACK_ZSYRFS FORTRAN_ID( zsyrfs )
+
+// Value-type variants of sytrf
+#define LAPACK_SSYTRF FORTRAN_ID( ssytrf )
+#define LAPACK_DSYTRF FORTRAN_ID( dsytrf )
+#define LAPACK_CSYTRF FORTRAN_ID( csytrf )
+#define LAPACK_ZSYTRF FORTRAN_ID( zsytrf )
+
+// Value-type variants of sytri
+#define LAPACK_SSYTRI FORTRAN_ID( ssytri )
+#define LAPACK_DSYTRI FORTRAN_ID( dsytri )
+#define LAPACK_CSYTRI FORTRAN_ID( csytri )
+#define LAPACK_ZSYTRI FORTRAN_ID( zsytri )
+
+// Value-type variants of sytrs
+#define LAPACK_SSYTRS FORTRAN_ID( ssytrs )
+#define LAPACK_DSYTRS FORTRAN_ID( dsytrs )
+#define LAPACK_CSYTRS FORTRAN_ID( csytrs )
+#define LAPACK_ZSYTRS FORTRAN_ID( zsytrs )
+
+// Value-type variants of tbcon
+#define LAPACK_STBCON FORTRAN_ID( stbcon )
+#define LAPACK_DTBCON FORTRAN_ID( dtbcon )
+#define LAPACK_CTBCON FORTRAN_ID( ctbcon )
+#define LAPACK_ZTBCON FORTRAN_ID( ztbcon )
+
+// Value-type variants of tbrfs
+#define LAPACK_STBRFS FORTRAN_ID( stbrfs )
+#define LAPACK_DTBRFS FORTRAN_ID( dtbrfs )
+#define LAPACK_CTBRFS FORTRAN_ID( ctbrfs )
+#define LAPACK_ZTBRFS FORTRAN_ID( ztbrfs )
+
+// Value-type variants of tbtrs
+#define LAPACK_STBTRS FORTRAN_ID( stbtrs )
+#define LAPACK_DTBTRS FORTRAN_ID( dtbtrs )
+#define LAPACK_CTBTRS FORTRAN_ID( ctbtrs )
+#define LAPACK_ZTBTRS FORTRAN_ID( ztbtrs )
+
+// Value-type variants of tprfs
+#define LAPACK_STPRFS FORTRAN_ID( stprfs )
+#define LAPACK_DTPRFS FORTRAN_ID( dtprfs )
+#define LAPACK_CTPRFS FORTRAN_ID( ctprfs )
+#define LAPACK_ZTPRFS FORTRAN_ID( ztprfs )
+
+// Value-type variants of tptrs
+#define LAPACK_STPTRS FORTRAN_ID( stptrs )
+#define LAPACK_DTPTRS FORTRAN_ID( dtptrs )
+#define LAPACK_CTPTRS FORTRAN_ID( ctptrs )
+#define LAPACK_ZTPTRS FORTRAN_ID( ztptrs )
+
+// Value-type variants of trcon
+#define LAPACK_STRCON FORTRAN_ID( strcon )
+#define LAPACK_DTRCON FORTRAN_ID( dtrcon )
+#define LAPACK_CTRCON FORTRAN_ID( ctrcon )
+#define LAPACK_ZTRCON FORTRAN_ID( ztrcon )
+
+// Value-type variants of trrfs
+#define LAPACK_STRRFS FORTRAN_ID( strrfs )
+#define LAPACK_DTRRFS FORTRAN_ID( dtrrfs )
+#define LAPACK_CTRRFS FORTRAN_ID( ctrrfs )
+#define LAPACK_ZTRRFS FORTRAN_ID( ztrrfs )
+
+// Value-type variants of trtri
+#define LAPACK_STRTRI FORTRAN_ID( strtri )
+#define LAPACK_DTRTRI FORTRAN_ID( dtrtri )
+#define LAPACK_CTRTRI FORTRAN_ID( ctrtri )
+#define LAPACK_ZTRTRI FORTRAN_ID( ztrtri )
+
+// Value-type variants of trtrs
+#define LAPACK_STRTRS FORTRAN_ID( strtrs )
+#define LAPACK_DTRTRS FORTRAN_ID( dtrtrs )
+#define LAPACK_CTRTRS FORTRAN_ID( ctrtrs )
+#define LAPACK_ZTRTRS FORTRAN_ID( ztrtrs )
+
+// Value-type variants of hbtrd
+#define LAPACK_CHBTRD FORTRAN_ID( chbtrd )
+#define LAPACK_ZHBTRD FORTRAN_ID( zhbtrd )
+
+// Value-type variants of hetrd
+#define LAPACK_CHETRD FORTRAN_ID( chetrd )
+#define LAPACK_ZHETRD FORTRAN_ID( zhetrd )
+
+// Value-type variants of laebz
+#define LAPACK_SLAEBZ FORTRAN_ID( slaebz )
+#define LAPACK_DLAEBZ FORTRAN_ID( dlaebz )
+
+// Value-type variants of latrd
+#define LAPACK_SLATRD FORTRAN_ID( slatrd )
+#define LAPACK_DLATRD FORTRAN_ID( dlatrd )
+#define LAPACK_CLATRD FORTRAN_ID( clatrd )
+#define LAPACK_ZLATRD FORTRAN_ID( zlatrd )
+
+// Value-type variants of opgtr
+#define LAPACK_SOPGTR FORTRAN_ID( sopgtr )
+#define LAPACK_DOPGTR FORTRAN_ID( dopgtr )
+
+// Value-type variants of opmtr
+#define LAPACK_SOPMTR FORTRAN_ID( sopmtr )
+#define LAPACK_DOPMTR FORTRAN_ID( dopmtr )
+
+// Value-type variants of orgtr
+#define LAPACK_SORGTR FORTRAN_ID( sorgtr )
+#define LAPACK_DORGTR FORTRAN_ID( dorgtr )
+
+// Value-type variants of ormtr
+#define LAPACK_SORMTR FORTRAN_ID( sormtr )
+#define LAPACK_DORMTR FORTRAN_ID( dormtr )
+
+// Value-type variants of pteqr
+#define LAPACK_SPTEQR FORTRAN_ID( spteqr )
+#define LAPACK_DPTEQR FORTRAN_ID( dpteqr )
+#define LAPACK_CPTEQR FORTRAN_ID( cpteqr )
+#define LAPACK_ZPTEQR FORTRAN_ID( zpteqr )
+
+// Value-type variants of sbtrd
+#define LAPACK_SSBTRD FORTRAN_ID( ssbtrd )
+#define LAPACK_DSBTRD FORTRAN_ID( dsbtrd )
+
+// Value-type variants of stebz
+#define LAPACK_SSTEBZ FORTRAN_ID( sstebz )
+#define LAPACK_DSTEBZ FORTRAN_ID( dstebz )
+
+// Value-type variants of stedc
+#define LAPACK_SSTEDC FORTRAN_ID( sstedc )
+#define LAPACK_DSTEDC FORTRAN_ID( dstedc )
+#define LAPACK_CSTEDC FORTRAN_ID( cstedc )
+#define LAPACK_ZSTEDC FORTRAN_ID( zstedc )
+
+// Value-type variants of stegr
+#define LAPACK_SSTEGR FORTRAN_ID( sstegr )
+#define LAPACK_DSTEGR FORTRAN_ID( dstegr )
+#define LAPACK_CSTEGR FORTRAN_ID( cstegr )
+#define LAPACK_ZSTEGR FORTRAN_ID( zstegr )
+
+// Value-type variants of stein
+#define LAPACK_SSTEIN FORTRAN_ID( sstein )
+#define LAPACK_DSTEIN FORTRAN_ID( dstein )
+#define LAPACK_CSTEIN FORTRAN_ID( cstein )
+#define LAPACK_ZSTEIN FORTRAN_ID( zstein )
+
+// Value-type variants of steqr
+#define LAPACK_SSTEQR FORTRAN_ID( ssteqr )
+#define LAPACK_DSTEQR FORTRAN_ID( dsteqr )
+#define LAPACK_CSTEQR FORTRAN_ID( csteqr )
+#define LAPACK_ZSTEQR FORTRAN_ID( zsteqr )
+
+// Value-type variants of sterf
+#define LAPACK_SSTERF FORTRAN_ID( ssterf )
+#define LAPACK_DSTERF FORTRAN_ID( dsterf )
+
+// Value-type variants of sytrd
+#define LAPACK_SSYTRD FORTRAN_ID( ssytrd )
+#define LAPACK_DSYTRD FORTRAN_ID( dsytrd )
+
+// Value-type variants of ungtr
+#define LAPACK_CUNGTR FORTRAN_ID( cungtr )
+#define LAPACK_ZUNGTR FORTRAN_ID( zungtr )
+
+// Value-type variants of unmtr
+#define LAPACK_CUNMTR FORTRAN_ID( cunmtr )
+#define LAPACK_ZUNMTR FORTRAN_ID( zunmtr )
+
+// Value-type variants of upgtr
+#define LAPACK_CUPGTR FORTRAN_ID( cupgtr )
+#define LAPACK_ZUPGTR FORTRAN_ID( zupgtr )
+
+// Value-type variants of upmtr
+#define LAPACK_CUPMTR FORTRAN_ID( cupmtr )
+#define LAPACK_ZUPMTR FORTRAN_ID( zupmtr )
+
+// Value-type variants of ggbak
+#define LAPACK_SGGBAK FORTRAN_ID( sggbak )
+#define LAPACK_DGGBAK FORTRAN_ID( dggbak )
+#define LAPACK_CGGBAK FORTRAN_ID( cggbak )
+#define LAPACK_ZGGBAK FORTRAN_ID( zggbak )
+
+// Value-type variants of ggbal
+#define LAPACK_SGGBAL FORTRAN_ID( sggbal )
+#define LAPACK_DGGBAL FORTRAN_ID( dggbal )
+#define LAPACK_CGGBAL FORTRAN_ID( cggbal )
+#define LAPACK_ZGGBAL FORTRAN_ID( zggbal )
+
+// Value-type variants of gghrd
+#define LAPACK_SGGHRD FORTRAN_ID( sgghrd )
+#define LAPACK_DGGHRD FORTRAN_ID( dgghrd )
+#define LAPACK_CGGHRD FORTRAN_ID( cgghrd )
+#define LAPACK_ZGGHRD FORTRAN_ID( zgghrd )
+
+// Value-type variants of hgeqz
+#define LAPACK_SHGEQZ FORTRAN_ID( shgeqz )
+#define LAPACK_DHGEQZ FORTRAN_ID( dhgeqz )
+#define LAPACK_CHGEQZ FORTRAN_ID( chgeqz )
+#define LAPACK_ZHGEQZ FORTRAN_ID( zhgeqz )
+
+// Value-type variants of tgevc
+#define LAPACK_STGEVC FORTRAN_ID( stgevc )
+#define LAPACK_DTGEVC FORTRAN_ID( dtgevc )
+#define LAPACK_CTGEVC FORTRAN_ID( ctgevc )
+#define LAPACK_ZTGEVC FORTRAN_ID( ztgevc )
+
+// Value-type variants of tgexc
+#define LAPACK_STGEXC FORTRAN_ID( stgexc )
+#define LAPACK_DTGEXC FORTRAN_ID( dtgexc )
+#define LAPACK_CTGEXC FORTRAN_ID( ctgexc )
+#define LAPACK_ZTGEXC FORTRAN_ID( ztgexc )
+
+// Value-type variants of tgsen
+#define LAPACK_STGSEN FORTRAN_ID( stgsen )
+#define LAPACK_DTGSEN FORTRAN_ID( dtgsen )
+#define LAPACK_CTGSEN FORTRAN_ID( ctgsen )
+#define LAPACK_ZTGSEN FORTRAN_ID( ztgsen )
+
+// Value-type variants of tgsna
+#define LAPACK_STGSNA FORTRAN_ID( stgsna )
+#define LAPACK_DTGSNA FORTRAN_ID( dtgsna )
+#define LAPACK_CTGSNA FORTRAN_ID( ctgsna )
+#define LAPACK_ZTGSNA FORTRAN_ID( ztgsna )
+
+// Value-type variants of tgsyl
+#define LAPACK_STGSYL FORTRAN_ID( stgsyl )
+#define LAPACK_DTGSYL FORTRAN_ID( dtgsyl )
+#define LAPACK_CTGSYL FORTRAN_ID( ctgsyl )
+#define LAPACK_ZTGSYL FORTRAN_ID( ztgsyl )
+
+// Value-type variants of ggsvp
+#define LAPACK_SGGSVP FORTRAN_ID( sggsvp )
+#define LAPACK_DGGSVP FORTRAN_ID( dggsvp )
+#define LAPACK_CGGSVP FORTRAN_ID( cggsvp )
+#define LAPACK_ZGGSVP FORTRAN_ID( zggsvp )
+
+// Value-type variants of tgsja
+#define LAPACK_STGSJA FORTRAN_ID( stgsja )
+#define LAPACK_DTGSJA FORTRAN_ID( dtgsja )
+#define LAPACK_CTGSJA FORTRAN_ID( ctgsja )
+#define LAPACK_ZTGSJA FORTRAN_ID( ztgsja )
+
+//
+// LAPACK driver routines
+//
+
+// Value-type variants of gegv
+#define LAPACK_SGEGV FORTRAN_ID( sgegv )
+#define LAPACK_DGEGV FORTRAN_ID( dgegv )
+#define LAPACK_CGEGV FORTRAN_ID( cgegv )
+#define LAPACK_ZGEGV FORTRAN_ID( zgegv )
+
+// Value-type variants of gges
+#define LAPACK_SGGES FORTRAN_ID( sgges )
+#define LAPACK_DGGES FORTRAN_ID( dgges )
+#define LAPACK_CGGES FORTRAN_ID( cgges )
+#define LAPACK_ZGGES FORTRAN_ID( zgges )
+
+// Value-type variants of ggesx
+#define LAPACK_SGGESX FORTRAN_ID( sggesx )
+#define LAPACK_DGGESX FORTRAN_ID( dggesx )
+#define LAPACK_CGGESX FORTRAN_ID( cggesx )
+#define LAPACK_ZGGESX FORTRAN_ID( zggesx )
+
+// Value-type variants of ggev
+#define LAPACK_SGGEV FORTRAN_ID( sggev )
+#define LAPACK_DGGEV FORTRAN_ID( dggev )
+#define LAPACK_CGGEV FORTRAN_ID( cggev )
+#define LAPACK_ZGGEV FORTRAN_ID( zggev )
+
+// Value-type variants of ggevx
+#define LAPACK_SGGEVX FORTRAN_ID( sggevx )
+#define LAPACK_DGGEVX FORTRAN_ID( dggevx )
+#define LAPACK_CGGEVX FORTRAN_ID( cggevx )
+#define LAPACK_ZGGEVX FORTRAN_ID( zggevx )
+
+// Value-type variants of ggsvd
+#define LAPACK_SGGSVD FORTRAN_ID( sggsvd )
+#define LAPACK_DGGSVD FORTRAN_ID( dggsvd )
+#define LAPACK_CGGSVD FORTRAN_ID( cggsvd )
+#define LAPACK_ZGGSVD FORTRAN_ID( zggsvd )
+
+// Value-type variants of hbgv
+#define LAPACK_CHBGV FORTRAN_ID( chbgv )
+#define LAPACK_ZHBGV FORTRAN_ID( zhbgv )
+
+// Value-type variants of hbgvd
+#define LAPACK_CHBGVD FORTRAN_ID( chbgvd )
+#define LAPACK_ZHBGVD FORTRAN_ID( zhbgvd )
+
+// Value-type variants of hbgvx
+#define LAPACK_CHBGVX FORTRAN_ID( chbgvx )
+#define LAPACK_ZHBGVX FORTRAN_ID( zhbgvx )
+
+// Value-type variants of hegv
+#define LAPACK_CHEGV FORTRAN_ID( chegv )
+#define LAPACK_ZHEGV FORTRAN_ID( zhegv )
+
+// Value-type variants of hegvd
+#define LAPACK_CHEGVD FORTRAN_ID( chegvd )
+#define LAPACK_ZHEGVD FORTRAN_ID( zhegvd )
+
+// Value-type variants of hegvx
+#define LAPACK_CHEGVX FORTRAN_ID( chegvx )
+#define LAPACK_ZHEGVX FORTRAN_ID( zhegvx )
+
+// Value-type variants of hpgv
+#define LAPACK_CHPGV FORTRAN_ID( chpgv )
+#define LAPACK_ZHPGV FORTRAN_ID( zhpgv )
+
+// Value-type variants of hpgvd
+#define LAPACK_CHPGVD FORTRAN_ID( chpgvd )
+#define LAPACK_ZHPGVD FORTRAN_ID( zhpgvd )
+
+// Value-type variants of hpgvx
+#define LAPACK_CHPGVX FORTRAN_ID( chpgvx )
+#define LAPACK_ZHPGVX FORTRAN_ID( zhpgvx )
+
+// Value-type variants of lacgv
+#define LAPACK_CLACGV FORTRAN_ID( clacgv )
+#define LAPACK_ZLACGV FORTRAN_ID( zlacgv )
+
+// Value-type variants of largv
+#define LAPACK_SLARGV FORTRAN_ID( slargv )
+#define LAPACK_DLARGV FORTRAN_ID( dlargv )
+#define LAPACK_CLARGV FORTRAN_ID( clargv )
+#define LAPACK_ZLARGV FORTRAN_ID( zlargv )
+
+// Value-type variants of sbgv
+#define LAPACK_SSBGV FORTRAN_ID( ssbgv )
+#define LAPACK_DSBGV FORTRAN_ID( dsbgv )
+
+// Value-type variants of sbgvd
+#define LAPACK_SSBGVD FORTRAN_ID( ssbgvd )
+#define LAPACK_DSBGVD FORTRAN_ID( dsbgvd )
+
+// Value-type variants of sbgvx
+#define LAPACK_SSBGVX FORTRAN_ID( ssbgvx )
+#define LAPACK_DSBGVX FORTRAN_ID( dsbgvx )
+
+// Value-type variants of spgv
+#define LAPACK_SSPGV FORTRAN_ID( sspgv )
+#define LAPACK_DSPGV FORTRAN_ID( dspgv )
+
+// Value-type variants of spgvd
+#define LAPACK_SSPGVD FORTRAN_ID( sspgvd )
+#define LAPACK_DSPGVD FORTRAN_ID( dspgvd )
+
+// Value-type variants of spgvx
+#define LAPACK_SSPGVX FORTRAN_ID( sspgvx )
+#define LAPACK_DSPGVX FORTRAN_ID( dspgvx )
+
+// Value-type variants of sygv
+#define LAPACK_SSYGV FORTRAN_ID( ssygv )
+#define LAPACK_DSYGV FORTRAN_ID( dsygv )
+
+// Value-type variants of sygvd
+#define LAPACK_SSYGVD FORTRAN_ID( ssygvd )
+#define LAPACK_DSYGVD FORTRAN_ID( dsygvd )
+
+// Value-type variants of sygvx
+#define LAPACK_SSYGVX FORTRAN_ID( ssygvx )
+#define LAPACK_DSYGVX FORTRAN_ID( dsygvx )
+
+// Value-type variants of ggglm
+#define LAPACK_SGGGLM FORTRAN_ID( sggglm )
+#define LAPACK_DGGGLM FORTRAN_ID( dggglm )
+#define LAPACK_CGGGLM FORTRAN_ID( cggglm )
+#define LAPACK_ZGGGLM FORTRAN_ID( zggglm )
+
+// Value-type variants of gglse
+#define LAPACK_SGGLSE FORTRAN_ID( sgglse )
+#define LAPACK_DGGLSE FORTRAN_ID( dgglse )
+#define LAPACK_CGGLSE FORTRAN_ID( cgglse )
+#define LAPACK_ZGGLSE FORTRAN_ID( zgglse )
+
+// Value-type variants of cgesv
+#define LAPACK_ZCGESV FORTRAN_ID( zcgesv )
+
+// Value-type variants of gbsv
+#define LAPACK_SGBSV FORTRAN_ID( sgbsv )
+#define LAPACK_DGBSV FORTRAN_ID( dgbsv )
+#define LAPACK_CGBSV FORTRAN_ID( cgbsv )
+#define LAPACK_ZGBSV FORTRAN_ID( zgbsv )
+
+// Value-type variants of gbsvx
+#define LAPACK_SGBSVX FORTRAN_ID( sgbsvx )
+#define LAPACK_DGBSVX FORTRAN_ID( dgbsvx )
+#define LAPACK_CGBSVX FORTRAN_ID( cgbsvx )
+#define LAPACK_ZGBSVX FORTRAN_ID( zgbsvx )
+
+// Value-type variants of gesv
+#define LAPACK_SGESV FORTRAN_ID( sgesv )
+#define LAPACK_DGESV FORTRAN_ID( dgesv )
+#define LAPACK_CGESV FORTRAN_ID( cgesv )
+#define LAPACK_ZGESV FORTRAN_ID( zgesv )
+
+// Value-type variants of gesvx
+#define LAPACK_SGESVX FORTRAN_ID( sgesvx )
+#define LAPACK_DGESVX FORTRAN_ID( dgesvx )
+#define LAPACK_CGESVX FORTRAN_ID( cgesvx )
+#define LAPACK_ZGESVX FORTRAN_ID( zgesvx )
+
+// Value-type variants of gtsv
+#define LAPACK_SGTSV FORTRAN_ID( sgtsv )
+#define LAPACK_DGTSV FORTRAN_ID( dgtsv )
+#define LAPACK_CGTSV FORTRAN_ID( cgtsv )
+#define LAPACK_ZGTSV FORTRAN_ID( zgtsv )
+
+// Value-type variants of gtsvx
+#define LAPACK_SGTSVX FORTRAN_ID( sgtsvx )
+#define LAPACK_DGTSVX FORTRAN_ID( dgtsvx )
+#define LAPACK_CGTSVX FORTRAN_ID( cgtsvx )
+#define LAPACK_ZGTSVX FORTRAN_ID( zgtsvx )
+
+// Value-type variants of hesv
+#define LAPACK_CHESV FORTRAN_ID( chesv )
+#define LAPACK_ZHESV FORTRAN_ID( zhesv )
+
+// Value-type variants of hesvx
+#define LAPACK_CHESVX FORTRAN_ID( chesvx )
+#define LAPACK_ZHESVX FORTRAN_ID( zhesvx )
+
+// Value-type variants of hpsv
+#define LAPACK_CHPSV FORTRAN_ID( chpsv )
+#define LAPACK_ZHPSV FORTRAN_ID( zhpsv )
+
+// Value-type variants of hpsvx
+#define LAPACK_CHPSVX FORTRAN_ID( chpsvx )
+#define LAPACK_ZHPSVX FORTRAN_ID( zhpsvx )
+
+// Value-type variants of pbsv
+#define LAPACK_SPBSV FORTRAN_ID( spbsv )
+#define LAPACK_DPBSV FORTRAN_ID( dpbsv )
+#define LAPACK_CPBSV FORTRAN_ID( cpbsv )
+#define LAPACK_ZPBSV FORTRAN_ID( zpbsv )
+
+// Value-type variants of pbsvx
+#define LAPACK_SPBSVX FORTRAN_ID( spbsvx )
+#define LAPACK_DPBSVX FORTRAN_ID( dpbsvx )
+#define LAPACK_CPBSVX FORTRAN_ID( cpbsvx )
+#define LAPACK_ZPBSVX FORTRAN_ID( zpbsvx )
+
+// Value-type variants of posv
+#define LAPACK_SPOSV FORTRAN_ID( sposv )
+#define LAPACK_DPOSV FORTRAN_ID( dposv )
+#define LAPACK_CPOSV FORTRAN_ID( cposv )
+#define LAPACK_ZPOSV FORTRAN_ID( zposv )
+
+// Value-type variants of posvx
+#define LAPACK_SPOSVX FORTRAN_ID( sposvx )
+#define LAPACK_DPOSVX FORTRAN_ID( dposvx )
+#define LAPACK_CPOSVX FORTRAN_ID( cposvx )
+#define LAPACK_ZPOSVX FORTRAN_ID( zposvx )
+
+// Value-type variants of ppsv
+#define LAPACK_SPPSV FORTRAN_ID( sppsv )
+#define LAPACK_DPPSV FORTRAN_ID( dppsv )
+#define LAPACK_CPPSV FORTRAN_ID( cppsv )
+#define LAPACK_ZPPSV FORTRAN_ID( zppsv )
+
+// Value-type variants of ppsvx
+#define LAPACK_SPPSVX FORTRAN_ID( sppsvx )
+#define LAPACK_DPPSVX FORTRAN_ID( dppsvx )
+#define LAPACK_CPPSVX FORTRAN_ID( cppsvx )
+#define LAPACK_ZPPSVX FORTRAN_ID( zppsvx )
+
+// Value-type variants of ptsv
+#define LAPACK_SPTSV FORTRAN_ID( sptsv )
+#define LAPACK_DPTSV FORTRAN_ID( dptsv )
+#define LAPACK_CPTSV FORTRAN_ID( cptsv )
+#define LAPACK_ZPTSV FORTRAN_ID( zptsv )
+
+// Value-type variants of ptsvx
+#define LAPACK_SPTSVX FORTRAN_ID( sptsvx )
+#define LAPACK_DPTSVX FORTRAN_ID( dptsvx )
+#define LAPACK_CPTSVX FORTRAN_ID( cptsvx )
+#define LAPACK_ZPTSVX FORTRAN_ID( zptsvx )
+
+// Value-type variants of sgesv
+#define LAPACK_DSGESV FORTRAN_ID( dsgesv )
+
+// Value-type variants of spsv
+#define LAPACK_SSPSV FORTRAN_ID( sspsv )
+#define LAPACK_DSPSV FORTRAN_ID( dspsv )
+#define LAPACK_CSPSV FORTRAN_ID( cspsv )
+#define LAPACK_ZSPSV FORTRAN_ID( zspsv )
+
+// Value-type variants of spsvx
+#define LAPACK_SSPSVX FORTRAN_ID( sspsvx )
+#define LAPACK_DSPSVX FORTRAN_ID( dspsvx )
+#define LAPACK_CSPSVX FORTRAN_ID( cspsvx )
+#define LAPACK_ZSPSVX FORTRAN_ID( zspsvx )
+
+// Value-type variants of sysv
+#define LAPACK_SSYSV FORTRAN_ID( ssysv )
+#define LAPACK_DSYSV FORTRAN_ID( dsysv )
+#define LAPACK_CSYSV FORTRAN_ID( csysv )
+#define LAPACK_ZSYSV FORTRAN_ID( zsysv )
+
+// Value-type variants of sysvx
+#define LAPACK_SSYSVX FORTRAN_ID( ssysvx )
+#define LAPACK_DSYSVX FORTRAN_ID( dsysvx )
+#define LAPACK_CSYSVX FORTRAN_ID( csysvx )
+#define LAPACK_ZSYSVX FORTRAN_ID( zsysvx )
+
+// Value-type variants of gees
+#define LAPACK_SGEES FORTRAN_ID( sgees )
+#define LAPACK_DGEES FORTRAN_ID( dgees )
+#define LAPACK_CGEES FORTRAN_ID( cgees )
+#define LAPACK_ZGEES FORTRAN_ID( zgees )
+
+// Value-type variants of geesx
+#define LAPACK_SGEESX FORTRAN_ID( sgeesx )
+#define LAPACK_DGEESX FORTRAN_ID( dgeesx )
+#define LAPACK_CGEESX FORTRAN_ID( cgeesx )
+#define LAPACK_ZGEESX FORTRAN_ID( zgeesx )
+
+// Value-type variants of geev
+#define LAPACK_SGEEV FORTRAN_ID( sgeev )
+#define LAPACK_DGEEV FORTRAN_ID( dgeev )
+#define LAPACK_CGEEV FORTRAN_ID( cgeev )
+#define LAPACK_ZGEEV FORTRAN_ID( zgeev )
+
+// Value-type variants of geevx
+#define LAPACK_SGEEVX FORTRAN_ID( sgeevx )
+#define LAPACK_DGEEVX FORTRAN_ID( dgeevx )
+#define LAPACK_CGEEVX FORTRAN_ID( cgeevx )
+#define LAPACK_ZGEEVX FORTRAN_ID( zgeevx )
+
+// Value-type variants of gesdd
+#define LAPACK_SGESDD FORTRAN_ID( sgesdd )
+#define LAPACK_DGESDD FORTRAN_ID( dgesdd )
+#define LAPACK_CGESDD FORTRAN_ID( cgesdd )
+#define LAPACK_ZGESDD FORTRAN_ID( zgesdd )
+
+// Value-type variants of gesvd
+#define LAPACK_SGESVD FORTRAN_ID( sgesvd )
+#define LAPACK_DGESVD FORTRAN_ID( dgesvd )
+#define LAPACK_CGESVD FORTRAN_ID( cgesvd )
+#define LAPACK_ZGESVD FORTRAN_ID( zgesvd )
+
+// Value-type variants of hbev
+#define LAPACK_CHBEV FORTRAN_ID( chbev )
+#define LAPACK_ZHBEV FORTRAN_ID( zhbev )
+
+// Value-type variants of hbevd
+#define LAPACK_CHBEVD FORTRAN_ID( chbevd )
+#define LAPACK_ZHBEVD FORTRAN_ID( zhbevd )
+
+// Value-type variants of hbevx
+#define LAPACK_CHBEVX FORTRAN_ID( chbevx )
+#define LAPACK_ZHBEVX FORTRAN_ID( zhbevx )
+
+// Value-type variants of heev
+#define LAPACK_CHEEV FORTRAN_ID( cheev )
+#define LAPACK_ZHEEV FORTRAN_ID( zheev )
+
+// Value-type variants of heevd
+#define LAPACK_CHEEVD FORTRAN_ID( cheevd )
+#define LAPACK_ZHEEVD FORTRAN_ID( zheevd )
+
+// Value-type variants of heevr
+#define LAPACK_CHEEVR FORTRAN_ID( cheevr )
+#define LAPACK_ZHEEVR FORTRAN_ID( zheevr )
+
+// Value-type variants of heevx
+#define LAPACK_CHEEVX FORTRAN_ID( cheevx )
+#define LAPACK_ZHEEVX FORTRAN_ID( zheevx )
+
+// Value-type variants of hpev
+#define LAPACK_CHPEV FORTRAN_ID( chpev )
+#define LAPACK_ZHPEV FORTRAN_ID( zhpev )
+
+// Value-type variants of hpevd
+#define LAPACK_CHPEVD FORTRAN_ID( chpevd )
+#define LAPACK_ZHPEVD FORTRAN_ID( zhpevd )
+
+// Value-type variants of hpevx
+#define LAPACK_CHPEVX FORTRAN_ID( chpevx )
+#define LAPACK_ZHPEVX FORTRAN_ID( zhpevx )
+
+// Value-type variants of sbev
+#define LAPACK_SSBEV FORTRAN_ID( ssbev )
+#define LAPACK_DSBEV FORTRAN_ID( dsbev )
+
+// Value-type variants of sbevd
+#define LAPACK_SSBEVD FORTRAN_ID( ssbevd )
+#define LAPACK_DSBEVD FORTRAN_ID( dsbevd )
+
+// Value-type variants of sbevx
+#define LAPACK_SSBEVX FORTRAN_ID( ssbevx )
+#define LAPACK_DSBEVX FORTRAN_ID( dsbevx )
+
+// Value-type variants of spev
+#define LAPACK_SSPEV FORTRAN_ID( sspev )
+#define LAPACK_DSPEV FORTRAN_ID( dspev )
+
+// Value-type variants of spevd
+#define LAPACK_SSPEVD FORTRAN_ID( sspevd )
+#define LAPACK_DSPEVD FORTRAN_ID( dspevd )
+
+// Value-type variants of spevx
+#define LAPACK_SSPEVX FORTRAN_ID( sspevx )
+#define LAPACK_DSPEVX FORTRAN_ID( dspevx )
+
+// Value-type variants of stev
+#define LAPACK_SSTEV FORTRAN_ID( sstev )
+#define LAPACK_DSTEV FORTRAN_ID( dstev )
+
+// Value-type variants of stevd
+#define LAPACK_SSTEVD FORTRAN_ID( sstevd )
+#define LAPACK_DSTEVD FORTRAN_ID( dstevd )
+
+// Value-type variants of stevr
+#define LAPACK_SSTEVR FORTRAN_ID( sstevr )
+#define LAPACK_DSTEVR FORTRAN_ID( dstevr )
+
+// Value-type variants of stevx
+#define LAPACK_SSTEVX FORTRAN_ID( sstevx )
+#define LAPACK_DSTEVX FORTRAN_ID( dstevx )
+
+// Value-type variants of syev
+#define LAPACK_SSYEV FORTRAN_ID( ssyev )
+#define LAPACK_DSYEV FORTRAN_ID( dsyev )
+
+// Value-type variants of syevd
+#define LAPACK_SSYEVD FORTRAN_ID( ssyevd )
+#define LAPACK_DSYEVD FORTRAN_ID( dsyevd )
+
+// Value-type variants of syevr
+#define LAPACK_SSYEVR FORTRAN_ID( ssyevr )
+#define LAPACK_DSYEVR FORTRAN_ID( dsyevr )
+
+// Value-type variants of syevx
+#define LAPACK_SSYEVX FORTRAN_ID( ssyevx )
+#define LAPACK_DSYEVX FORTRAN_ID( dsyevx )
+
+// Value-type variants of gels
+#define LAPACK_SGELS FORTRAN_ID( sgels )
+#define LAPACK_DGELS FORTRAN_ID( dgels )
+#define LAPACK_CGELS FORTRAN_ID( cgels )
+#define LAPACK_ZGELS FORTRAN_ID( zgels )
+
+// Value-type variants of gelsd
+#define LAPACK_SGELSD FORTRAN_ID( sgelsd )
+#define LAPACK_DGELSD FORTRAN_ID( dgelsd )
+#define LAPACK_CGELSD FORTRAN_ID( cgelsd )
+#define LAPACK_ZGELSD FORTRAN_ID( zgelsd )
+
+// Value-type variants of gelss
+#define LAPACK_SGELSS FORTRAN_ID( sgelss )
+#define LAPACK_DGELSS FORTRAN_ID( dgelss )
+#define LAPACK_CGELSS FORTRAN_ID( cgelss )
+#define LAPACK_ZGELSS FORTRAN_ID( zgelss )
+
+// Value-type variants of gelsy
+#define LAPACK_SGELSY FORTRAN_ID( sgelsy )
+#define LAPACK_DGELSY FORTRAN_ID( dgelsy )
+#define LAPACK_CGELSY FORTRAN_ID( cgelsy )
+#define LAPACK_ZGELSY FORTRAN_ID( zgelsy )
+
+// Value-type variants of lalsd
+#define LAPACK_SLALSD FORTRAN_ID( slalsd )
+#define LAPACK_DLALSD FORTRAN_ID( dlalsd )
+#define LAPACK_CLALSD FORTRAN_ID( clalsd )
+#define LAPACK_ZLALSD FORTRAN_ID( zlalsd )
+
+#endif
+

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/solve.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/solve.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_SOLVE_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_SOLVE_HPP
+
+#include <boost/numeric/bindings/lapack/driver/gesv.hpp>
+#include <boost/numeric/bindings/lapack/driver/gbsv.hpp>
+#include <boost/numeric/bindings/lapack/driver/gtsv.hpp>
+#include <boost/numeric/bindings/lapack/driver/hesv.hpp>
+#include <boost/numeric/bindings/lapack/driver/hpsv.hpp>
+#include <boost/numeric/bindings/lapack/driver/posv.hpp>
+#include <boost/numeric/bindings/lapack/driver/ppsv.hpp>
+#include <boost/numeric/bindings/lapack/driver/pbsv.hpp>
+#include <boost/numeric/bindings/lapack/driver/ptsv.hpp>
+#include <boost/numeric/bindings/lapack/driver/sysv.hpp>
+#include <boost/numeric/bindings/lapack/driver/spsv.hpp>
+
+#include <boost/mpl/map.hpp>
+
+namespace mpl = boost::mpl;
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+
+template< typename MatrixA, typename MatrixB, typename Workspace >
+inline integer_t solve( MatrixA& a, MatrixB& b, Workspace work = optimal_workspace() ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixA >::matrix_structure matrix_structure;
+
+ typedef typename mpl::map<
+ mpl::pair< traits::general_t, gesv_impl< value_type > >,
+ mpl::pair< traits::symmetric_t, sysv_impl< value_type > >,
+ mpl::pair< traits::symmetric_packed_t, spsv_impl< value_type > >,
+ mpl::pair< traits::hermitian_t, hesv_impl< value_type > >,
+ mpl::pair< traits::hermitian_packed_t, hpsv_impl< value_type > >,
+ mpl::pair< traits::banded_t, gbsv_impl< value_type > >,
+ mpl::pair< traits::unknown_structure_t, gesv_impl< value_type > > > dispatch_map;
+
+ typedef typename mpl::at< dispatch_map, matrix_structure >::type driver_routine;
+
+ int info(0);
+ driver_routine::compute( a, b, info, work );
+ return info;
+}
+
+}}} // namespace boost::numeric::bindings::lapack
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/lapack/workspace.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/workspace.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,199 @@
+/*
+ *
+ * Copyright (c) Karl Meerbergen & Kresimir Fresl 2003
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * KF acknowledges the support of the Faculty of Civil Engineering,
+ * University of Zagreb, Croatia.
+ *
+ */
+
+#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_WORKSPACE_HPP
+#define BOOST_NUMERIC_BINDINGS_LAPACK_WORKSPACE_HPP
+
+#include <boost/numeric/bindings/traits/detail/array_impl.hpp>
+#include <boost/numeric/bindings/traits/type.hpp>
+#include <boost/numeric/bindings/traits/type_traits.hpp>
+#include <boost/numeric/bindings/traits/vector_traits.hpp>
+#include <memory>
+
+namespace boost { namespace numeric { namespace bindings {
+
+ /*
+ * Organization of workspace in Lapack.
+ * We allow one of the following arguments in a number of Lapack functions
+ * - minimal_workspace() : the function allocates the minimum workspace required for the function
+ * - optimal_workspace() : the function allocates the amount of workspace that allows optimal
+ * execution.
+ * - workspace( work ) : the function uses the workspace array in work.
+ * - workspace( rwork, work ) : the function uses a real array rwork and a compolex array work as
+ * workspace. (There are Lapack functions for complex matrices
+ * that require two workarrays)
+ * */
+
+ namespace lapack {
+
+
+ // Four classes are introduced to distinguish between the different type of memory allocations
+
+ struct minimal_workspace {} ;
+
+ struct optimal_workspace {} ;
+
+ namespace detail {
+
+ template <typename W>
+ class workspace1 {
+ public:
+ workspace1(W& w)
+ : w_( w )
+ {}
+
+ public:
+ typedef typename traits::vector_traits<W>::value_type value_type ;
+ W& select( value_type const& ) { return w_ ; }
+
+ private:
+ W& w_ ;
+ }; // struct workspace1
+
+ template <typename W, typename WRI>
+ class workspace2 {
+ public:
+ workspace2(W& w, WRI& wri)
+ : w_(w)
+ , wri_(wri)
+ {}
+
+ public:
+ typedef typename traits::vector_traits<W>::value_type w_value_type ;
+ W& select( w_value_type const& ) { return w_ ; }
+
+ typedef typename traits::vector_traits<WRI>::value_type wri_value_type ;
+ WRI& select( wri_value_type const& ) { return wri_ ; }
+
+ private:
+ W& w_ ;
+ WRI& wri_ ;
+ }; // struct workspace2
+
+ template <typename W, typename WR, typename WI>
+ class workspace3 {
+ public:
+ workspace3(W& w, WR& wr, WI& wi)
+ : w_(w)
+ , wr_(wr)
+ , wi_(wi)
+ {}
+
+ public:
+ typedef typename traits::vector_traits<W>::value_type w_value_type ;
+ W& select( w_value_type const& ) { return w_ ; }
+
+ typedef typename traits::vector_traits<WR>::value_type wr_value_type ;
+ WR& select( wr_value_type const& ) { return wr_ ; }
+
+ typedef typename traits::vector_traits<WI>::value_type wi_value_type ;
+ WI& select( wi_value_type const& ) { return wi_ ; }
+
+ private:
+ W& w_ ;
+ WR& wr_ ;
+ WI& wi_ ;
+ }; // struct workspace3
+
+ template <typename W, typename WR, typename WI, typename WB>
+ class workspace4 {
+ public:
+ workspace4(W& w, WR& wr, WI& wi, WB& wb)
+ : w_(w)
+ , wr_(wr)
+ , wi_(wi)
+ , wb_(wb)
+ {}
+
+ public:
+ typedef typename traits::vector_traits<W>::value_type w_value_type ;
+ W& select( w_value_type const& ) { return w_ ; }
+
+ typedef typename traits::vector_traits<WR>::value_type wr_value_type ;
+ WR& select( wr_value_type const& ) { return wr_ ; }
+
+ typedef typename traits::vector_traits<WI>::value_type wi_value_type ;
+ WI& select( wi_value_type const& ) { return wi_ ; }
+
+ typedef typename traits::vector_traits<WB>::value_type wb_value_type ;
+ WB& select( wb_value_type const& ) { return wb_ ; }
+
+ private:
+ W& w_ ;
+ WR& wr_ ;
+ WI& wi_ ;
+ WB& wb_ ;
+ }; // struct workspace4
+
+ }
+
+ template <typename W>
+ detail::workspace1<W> workspace(W& w) {
+ return detail::workspace1<W>(w) ;
+ } // workspace()
+
+ //
+ // Two situations:
+ // Real valued: workspace( real array, integer array )
+ // Complex valued: workspace( complex array, real array )
+ //
+ template <typename W, typename WRI>
+ detail::workspace2<W,WRI> workspace(W& w, WRI& wri) {
+ return detail::workspace2<W,WRI>(w, wri) ;
+ } // workspace()
+
+ //
+ // Complex valued: workspace( complex array, real array, integer array )
+ //
+ template <typename W, typename WR, typename WI>
+ detail::workspace3<W,WR,WI> workspace(W& w, WR& wr, WI& wi) {
+ return detail::workspace3<W,WR,WI>(w, wr, wi) ;
+ } // workspace()
+
+ //
+ // Complex valued: workspace( complex array, real array, integer array, bool array )
+ //
+ template <typename W, typename WR, typename WI, typename WB>
+ detail::workspace4<W,WR,WI,WB> workspace(W& w, WR& wr, WI& wi, WB& wb) {
+ return detail::workspace4<W,WR,WI,WB>(w, wr, wi, wb) ;
+ } // workspace()
+
+ /// Select the number of workspaces depending on the value_type
+ template <typename T>
+ struct n_workspace_args { };
+
+ template <>
+ struct n_workspace_args< float > {
+ static const int value = 1 ;
+ };
+
+ template <>
+ struct n_workspace_args< double > {
+ static const int value = 1 ;
+ };
+
+ template <>
+ struct n_workspace_args< traits::complex_f > {
+ static const int value = 2 ;
+ };
+
+ template <>
+ struct n_workspace_args< traits::complex_d > {
+ static const int value = 2 ;
+ };
+
+ }
+
+}}}
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/traits/is_complex.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/traits/is_complex.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2009 by Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_TRAITS_IS_COMPLEX_HPP
+#define BOOST_NUMERIC_BINDINGS_TRAITS_IS_COMPLEX_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/numeric/bindings/traits/type.h>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace traits {
+
+template< typename T >
+struct is_complex: boost::mpl::bool_<false> {};
+
+template<>
+struct is_complex< fcomplex_t >: boost::mpl::bool_<true> {};
+
+template<>
+struct is_complex< dcomplex_t >: boost::mpl::bool_<true> {};
+
+}}}}
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/traits/is_real.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/traits/is_real.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -0,0 +1,36 @@
+//
+// Copyright (c) 2009 by Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// THIS FILE IS AUTOMATICALLY GENERATED
+// PLEASE DO NOT EDIT!
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_TRAITS_IS_REAL_HPP
+#define BOOST_NUMERIC_BINDINGS_TRAITS_IS_REAL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace traits {
+
+template< typename T >
+struct is_real: boost::mpl::bool_<false> {};
+
+template<>
+struct is_real< float >: boost::mpl::bool_<true> {};
+
+template<>
+struct is_real< double >: boost::mpl::bool_<true> {};
+
+template<>
+struct is_real< long double >: boost::mpl::bool_<true> {};
+
+}}}}
+
+#endif

Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/numeric_bindings.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/numeric_bindings.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/numeric_bindings.qbk 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -11,36 +11,51 @@
     ]
 ]
 
+[section:preface Preface]
+
+
+[endsect]
 
 [section:introduction Introduction]
 
-This article is working document for documenting the Numeric Bindings.
+Boost.Numeric_Bindings is a library for high-performance numeric computing.
+
+The Bindings Library contains bindings to popular non-boost
+(numeric) libraries, usually written in Fortran or C.
+These non-boost libraries generally use data structures in their API for which
+there might be boostified equivalents or other popular non-boost equivalents.
+The Bindings Library offers a generic thin layer API on top of the
+original API of the external library. This generic API accepts a whole range of
+data structures from different origins and usually hides or reduces the
+complexity of the original API.
+
+For instance, [@http://math-atlas.sourceforge.net/ ATLAS] a C library
+implementing BLAS (and few LAPACK routines), represents matrices
+by means of a pointer and the dimensions. Now boost also contains
+matrix classes [@http://www.boost.org/libs/numeric/ublas/doc/index.htm uBLAS]
+and there are also other matrix libraries in widespread use.
+
+Therefore the Bindings library features a generic interface
+for ATLAS which provides the possibility
+to call e.g. the matrix-multiplication routine of ATLAS using matrices defined
+in uBLAS, TNT, etc.
 
 [endsect]
 
 [section:traits Datatype Concepts and Traits]
 [endsect]
 
+[section:tutorial Tutorial]
 
 
-[section:lapack High-level LAPACK Interface]
-Here, the high-level LAPACK bindings will be described.
 
-`lapack::solve( a, b );`
-
-``
-lapack::solve( a, b )
-lapack::eigen( a, b, ... );
-}
-``
 
 
 [endsect]
 
 
-[section:blas BLAS Interface]
-[endsect]
-
+[include blas.qbk]
+[include lapack.qbk]
 
 
 [section:license License]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -82,21 +82,45 @@
 
 
 #
-# Write the blas.h/lapack_names.h file.
+# For a group of routines, write their part in the
+# blas_names.h/lapack_names.h file.
 #
-def write_names_header( global_info_map, group, template_map, dest_file ):
- parsermode = template_map[ 'PARSERMODE' ].lower()
- group_keys = group.keys()
- group_keys.sort()
+def write_by_value_type( properties, template_map ):
   content = ''
+ group_keys = properties.keys()
+ group_keys.sort()
   for g in group_keys:
- content += '// Variants of ' + g.lower() + '\n'
- for k in group[ g ]:
- template = template_map[ parsermode + '_names.h_function' ]
+ content += '// Value-type variants of ' + g.lower() + '\n'
+ for k in properties[ g ]:
+ template = template_map[ template_map[ 'PARSERMODE' ].lower() + '_names.h_function' ]
       template = template.replace( '$SUBROUTINE', k )
       template = template.replace( '$subroutine', k.lower() )
       content += template
     content += '\n'
+ return content
+
+#
+# Write the blas_names.h/lapack_names.h file.
+#
+def write_names_header( global_info_map, routines, template_map, dest_file ):
+ parsermode = template_map[ 'PARSERMODE' ].lower()
+ content = ''
+
+ for level, level_properties in routines.iteritems():
+ content += '//\n'
+ content += '// ' + template_map[ 'PARSERMODE' ] + ' ' + level + ' routines\n'
+ content += '//\n\n'
+
+ if template_map[ 'PARSERMODE' ] == 'BLAS':
+ if level_properties.has_key( 'routines_by_value_type' ):
+ content += write_by_value_type( level_properties[ 'routines_by_value_type'], template_map )
+ else:
+ for problem_type, problem_properties in level_properties.iteritems():
+ #
+ # Here, we could write an informative header about the problem types
+ #
+ if problem_properties.has_key( 'routines_by_value_type' ):
+ content += write_by_value_type( problem_properties[ 'routines_by_value_type'], template_map )
 
   result = template_map[ parsermode + '_names.h' ]
   result = result.replace( "$CONTENT", content )
@@ -105,17 +129,18 @@
   open( dest_file, 'wb' ).write( result )
 
 
-#
-# Write the blas.h/lapack.h file
-#
-def write_header( global_info_map, group, template_map, dest_file ):
+
+
+
+
+def write_header_part( global_info_map, properties, template_map ):
   parsermode = template_map[ 'PARSERMODE' ].lower()
- group_keys = group.keys()
+ group_keys = properties.keys()
   group_keys.sort()
   content = ''
   for g in group_keys:
- content += '$INDENT// Variants of ' + g.lower() + '\n'
- for k in group[ g ]:
+ content += '// Value-type variants of ' + g.lower() + '\n'
+ for k in properties[ g ]:
 
       template = template_map[ parsermode + '.h_function' ]
       arg_list = []
@@ -129,10 +154,37 @@
       content += proper_indent( template )
 
     content += '\n'
+ return content
+
+
+
+#
+# Write the blas.h/lapack.h file
+#
+def write_header( global_info_map, routines, template_map, dest_file ):
+ parsermode = template_map[ 'PARSERMODE' ].lower()
+ content = ''
+
+ for level, level_properties in routines.iteritems():
+ content += '//\n'
+ content += '// ' + template_map[ 'PARSERMODE' ] + ' ' + level + ' routines\n'
+ content += '//\n\n'
+
+ if template_map[ 'PARSERMODE' ] == 'BLAS':
+ if level_properties.has_key( 'routines_by_value_type' ):
+ content += write_header_part( global_info_map, \
+ level_properties[ 'routines_by_value_type'], template_map )
+ else:
+ for problem_type, problem_properties in level_properties.iteritems():
+ #
+ # Here, we could write an informative header about the problem types
+ #
+ if problem_properties.has_key( 'routines_by_value_type' ):
+ content += write_header_part( global_info_map, \
+ problem_properties[ 'routines_by_value_type'], template_map )
 
   result = template_map[ parsermode + '.h' ]
   result = result.replace( "$CONTENT", content )
- result = result.replace( '$INDENT', ' ' )
   #result = result.replace( "$PARSERMODE", template_map[ "PARSERMODE" ] )
 
   open( dest_file, 'wb' ).write( result )

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -297,8 +297,8 @@
 print routines
 
 
-bindings.write_names_header( function_info_map, value_type_groups, templates, bindings_target_path + 'blas_names.h' )
-bindings.write_header( function_info_map, value_type_groups, templates, bindings_target_path + 'blas.h' )
+bindings.write_names_header( function_info_map, routines, templates, bindings_target_path + 'blas_names.h' )
+bindings.write_header( function_info_map, routines, templates, bindings_target_path + 'blas.h' )
 
 for level, level_properties in routines.iteritems():
   target_path = bindings_target_path + level

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -490,8 +490,8 @@
 print routines
 
 
-bindings.write_names_header( function_info_map, value_type_groups, templates, bindings_target_path + 'lapack_names.h' )
-bindings.write_header( function_info_map, value_type_groups, templates, bindings_target_path + 'lapack.h' )
+bindings.write_names_header( function_info_map, routines, templates, bindings_target_path + 'lapack_names.h' )
+bindings.write_header( function_info_map, routines, templates, bindings_target_path + 'lapack.h' )
 
 for level, level_properties in routines.iteritems():
   target_path = bindings_target_path + level

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -20,14 +20,12 @@
 
 extern "C" {
 
-$CONTENT
-
-}
+$CONTENT}
 
 #endif
 
 $TEMPLATE[blas.h_function]
- $RETURN_TYPE BLAS_$SUBROUTINE( $ARGUMENTS );
+$RETURN_TYPE BLAS_$SUBROUTINE( $ARGUMENTS );
 $TEMPLATE[blas_names.h]
 //
 // Copyright (c) 2003--2009

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp 2009-02-20 04:27:22 EST (Fri, 20 Feb 2009)
@@ -24,16 +24,19 @@
 
 extern "C" {
 
-$CONTENT
+$CONTENT//
+// LAPACK auxiliary routines
+//
+
+int LAPACK_ILAENV(int const* ispec, const char* name, const char* opt,
+ int const* n1, int const* n2, int const* n3, int const* n4, int, int);
 
- int LAPACK_ILAENV(int const* ispec, const char* name, const char* opt,
- int const* n1, int const* n2, int const* n3, int const* n4, int, int);
 }
 
 #endif
 
 $TEMPLATE[lapack.h_function]
- void LAPACK_$SUBROUTINE( $ARGUMENTS );
+void LAPACK_$SUBROUTINE( $ARGUMENTS );
 $TEMPLATE[lapack_names.h]
 //
 // Copyright (c) 2003--2009
@@ -57,9 +60,7 @@
 # define FORTRAN_ID( id ) id##_
 #endif
 
-$CONTENT
-
-#endif
+$CONTENT#endif
 
 $TEMPLATE[lapack_names.h_function]
 #define LAPACK_$SUBROUTINE FORTRAN_ID( $subroutine )


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk