Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
Apply patch to gels* from Naoki at http://mathema.tician.de/node/391.
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Nov 12, 2008
1 parent 5d59e97 commit c437514
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions boost/numeric/bindings/lapack/gels.hpp
Expand Up @@ -148,7 +148,7 @@ namespace boost { namespace numeric { namespace bindings {
inline
int gels_optimal_work(const char trans, MatrA& A, VecB& b)
{
MatrA::value_type work;
typename MatrA::value_type work;
int info;
detail::gels(trans,
traits::matrix_size1(A),
Expand Down Expand Up @@ -177,7 +177,7 @@ namespace boost { namespace numeric { namespace bindings {
{
// query optimal workspace size
int work_size = detail::gels_optimal_work(trans, A, b);
traits::detail::array<MatrA::value_type> work(work_size);
traits::detail::array<typename MatrA::value_type> work(work_size);

return detail::gels(trans, A, b, work);
}
Expand All @@ -194,7 +194,7 @@ namespace boost { namespace numeric { namespace bindings {
const int maxmn = std::max(m, n); // m > n ? m : n;
const int maxdim = std::max(maxmn, r); // maxmn > r ? maxmn : r;

traits::detail::array<MatrA::value_type> work(minmn + std::max(1, maxdim));
traits::detail::array<typename MatrA::value_type> work(minmn + std::max(1, maxdim));

return detail::gels(trans, A, b, work);
}
Expand Down
12 changes: 6 additions & 6 deletions boost/numeric/bindings/lapack/gelsd.hpp
Expand Up @@ -83,7 +83,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int gelsd(MatrA& A, MatrB& B, VecS& s, Work& work)
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -133,7 +133,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int gelsd(MatrA& A, MatrB& B, VecS& s, Work& work, RWork& rwork)
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -214,7 +214,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -279,7 +279,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -307,7 +307,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -402,7 +402,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int gelsd(MatrA& A, MatrB& B, Work& workspace)
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down
10 changes: 5 additions & 5 deletions boost/numeric/bindings/lapack/gelss.hpp
Expand Up @@ -78,7 +78,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int gelss(MatrA& A, MatrB& B, VecS& s, Work& work)
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -120,7 +120,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int gelss(MatrA& A, MatrB& B, VecS& s, Work& work, RWork& rwork)
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -188,7 +188,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down Expand Up @@ -243,7 +243,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand All @@ -263,7 +263,7 @@ namespace boost { namespace numeric { namespace bindings {
inline int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
{
typedef typename MatrA::value_type val_t;
typedef traits::type_traits<val_t>::real_type real_t;
typedef typename traits::type_traits<val_t>::real_type real_t;

const int m = traits::matrix_size1(A);
const int n = traits::matrix_size2(A);
Expand Down
6 changes: 6 additions & 0 deletions boost/numeric/bindings/lapack/lapack.hpp
Expand Up @@ -27,6 +27,12 @@
#include <boost/numeric/bindings/lapack/hesv.hpp>
#include <boost/numeric/bindings/lapack/hpsv.hpp>

// linear systems

#include <boost/numeric/bindings/lapack/gels.hpp>
#include <boost/numeric/bindings/lapack/gelss.hpp>
#include <boost/numeric/bindings/lapack/gelsd.hpp>

// eigenproblems

#include <boost/numeric/bindings/lapack/gees.hpp>
Expand Down

0 comments on commit c437514

Please sign in to comment.