|
Ublas : |
From: Preben Hagh Strunge Holm (preben_at_[hidden])
Date: 2007-01-05 05:41:55
Hi everyone
I just ran into quite a problem. I checked out the latest cvs version of
the boost-sandbox to try the bindings for lapack.
I tried list little sample program - just to get something working
(compilation):
--------
#include <iostream>
#include <boost/numeric/bindings/lapack/gesv.hpp>
#include <boost/numeric/ublas/matrix.hpp>
namespace ublas = boost::numeric::ublas;
namespace lapack = boost::numeric::bindings::lapack;
int main() {
ublas::matrix<double, ublas::column_major> A(3,3), B(3,1);
lapack::gesv(A,B);
return 0;
}
--------
As far as the examples I've seen the boost bindings for lapack should do
this without trouble since the matrix is column major.
But compilation (with stl-filt and gcc 3.4.6) gives me this error:
--------
preben_at_thinkgen ~/working/master/src $
/home/preben/scripts/gstlfilt/gfilt -I
/home/preben/working/boost-sandbox/ -c ublas_lapack.cpp
BD Software STL Message Decryptor v2.47a for gcc
/home/preben/working/boost-
sandbox/boost/numeric/bindings/traits/matrix_traits.hpp: In function
`int boost::numeric::bindings::traits::matrix_size1(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)':
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:137:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
ublas_lapack.cpp:14: instantiated from here
/home/preben/working/boost-sandbox/boost/numeric/bindings/traits/matrix_traits.hpp:102:
error: `size1' is not a member of
`boost::numeric::bindings::traits::matrix_traits<
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
>
>'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:
In
function
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &, boost::numeric::bindings::traits::detail::array<int> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)':
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
ublas_lapack.cpp:14: instantiated from here
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:100:
error: no type named `matrix_structure' in
`boost::numeric::bindings::traits::matrix_traits<
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
>
>'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:100:
error: size of array has non-integral type `<type error>'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:104:
error: no type named `matrix_structure' in
`boost::numeric::bindings::traits::matrix_traits<
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
>
>'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:104:
error: size of array has non-integral type `<type error>'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
ublas_lapack.cpp:14: instantiated from here
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:116:
error: No match for
`matrix_storage(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
ublas_lapack.cpp:14: instantiated from here
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:116:
error: No match for
`matrix_storage(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
/home/preben/working/boost-
sandbox/boost/numeric/bindings/traits/matrix_traits.hpp: In function
`int boost::numeric::bindings::traits::matrix_size2(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)':
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:111:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &, boost::numeric::bindings::traits::detail::array<int> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
ublas_lapack.cpp:14: instantiated from here
/home/preben/working/boost-sandbox/boost/numeric/bindings/traits/matrix_traits.hpp:106:
error: `size2' is not a member of
`boost::numeric::bindings::traits::matrix_traits<
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
>
>'
/home/preben/working/boost-
sandbox/boost/numeric/bindings/traits/matrix_traits.hpp: In function
`int boost::numeric::bindings::traits::leading_dimension(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)':
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:116:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &, boost::numeric::bindings::traits::detail::array<int> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
instantiated from
`int boost::numeric::bindings::lapack::gesv(
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
, boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
> &
)'
ublas_lapack.cpp:14: instantiated from here
/home/preben/working/boost-sandbox/boost/numeric/bindings/traits/matrix_traits.hpp:131:
error: `leading_dimension' is not a member of
`boost::numeric::bindings::traits::matrix_traits<
boost::numeric::ublas::matrix<
double, boost::numeric::ublas::column_major
, boost::numeric::ublas::unbounded_array<double>
>
>'
preben_at_thinkgen ~/working/master/src $
---------
It seems to me that the size1 and size2 isn't a member function? What
the * is wrong here?
I'm using the 1.33.1 version of boost (just from the gentoo ebuild).
Thanks for helping!
/ Preben