Boost logo

Ublas :

From: jk jk (jk.lists.questions_at_[hidden])
Date: 2008-08-26 17:53:02


Experiencing a really frustrating issue with ublas/lapack bindings.
The error and a test case are pasted here:

------code pasted below------

#include <iostream>
#include <boost/numeric/bindings/lapack/lapack.hpp>

int main(){
  using namespace boost::numeric;
  using namespace boost::numeric::bindings;

  ublas::matrix<double> ma (3, 3);
  ma(0,0)=1;
  ma(1,1)=1;
  ma(2,2)=1;
  ma(0,1)=1;
  ma(1,2)=1;
  ma(2,0)=1;
  ma(0,2)=1;
  ma(1,1)=1;
  ma(2,0)=1;
  std::cout << lapack::gesdd_iwork(ma);
}

----error pasted below-------

/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/ublas_matrix.hpp:
In instantiation of
'boost::numeric::bindings::traits::matrix_detail_traits<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >, boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> > >':
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/matrix_traits.hpp:48:
  instantiated from
'boost::numeric::bindings::traits::matrix_traits<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> > >'
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/lapack/gesdd.hpp:358:
  instantiated from 'int
boost::numeric::bindings::lapack::gesdd_iwork(const MatrA&) [with
MatrA = boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >]'
boostbindingserror.cpp:18: instantiated from here
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/ublas_matrix.hpp:46:
error: invalid application of 'sizeof' to incomplete type
'boost::STATIC_ASSERTION_FAILURE<false>'
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/ublas_matrix.hpp:
In instantiation of
'boost::numeric::bindings::traits::matrix_detail_traits<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >, const boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> > >':
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/matrix_traits.hpp:48:
  instantiated from
'boost::numeric::bindings::traits::matrix_traits<const
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> > >'
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/matrix_traits.hpp:99:
  instantiated from 'int
boost::numeric::bindings::traits::matrix_size1(M&) [with M = const
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >]'
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/lapack/gesdd.hpp:365:
  instantiated from 'int
boost::numeric::bindings::lapack::gesdd_iwork(const MatrA&) [with
MatrA = boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >]'
boostbindingserror.cpp:18: instantiated from here
/usr/local/include/boost-numeric-bindings/boost/numeric/bindings/traits/ublas_matrix.hpp:46:
error: invalid application of 'sizeof' to incomplete type
'boost::STATIC_ASSERTION_FAILURE<false>'