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 Mee